I have created a simple base class with 3 parameters (OBJECT1
, see below) and implemented a Core Data model where there is one entity derived from this class, with one attribute (order).
Problem is, when I save the context, only the dynamic parameters (created in the model) are stored in the sql file, those that are not included in the model (created manually) do not persist...
So the name1
, name2
and name3
params have values during the first time I create the object BUT at the next App run, since I don't create them anymore... they are null...
Same story if I create a derived classes from OBJECT1
class...
Is there a way to store the whole object permanently and use Core Data model only for those key attributes that require indexing?
BASE OBJECT1:
@interface OBJECT1 : NSManagedObject
{
NSString *name1;
NSString *name2;
NSString *name3;
}
@properties (nonatomic,assign) NSNumber *order;
@properties (nonatomic,copy) NSString *name1;
@properties (nonatomic,copy) NSString *name2;
@properties (nonatomic,copy) NSString *name3;
@end
@implementation OBJECT1
@dynamic order;
@synthesize name1;
@synthesize name2;
@synthesize nam3;
@end