Here is the interface of my object:
@interface MyItem : NSObject {
sqlite3 *database;
NSInteger *primaryKey;
NSInteger *accountKey;
NSInteger *categoryKey;
NSString *title;
BOOL hydrated;
BOOL dirty;
NSData *data; // Why do I need this?
}
The primary key will be auto generated in Sqlite and I am storing the integers, foreign keys of account and category in the MyItem table.
The account and category will have a meaningful description. Should I add properties for the descriptions as well? Like so:
NSString *accountDesc;
NSString *categoryDesc;
So that in my Hydrate method I can do a join to category and account.
What is the best practice to do this?
My goal is on the initial launch of the App, I will display a Tableview with title and category descriptions.