Adding ivars to NSManagedObject subclass
- by The Crazy Chimp
When I create an entity using core data then generate a subclass of NSManagedObject from it I get the following output (in the .h):
@class Foo;
@interface Foo : NSManagedObject
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSSet *otherValues;
@end
However, in my .m file I want to make use of the name and otherValues values. Normally I would simply create a couple of ivars and then add the properties for them as I required. That way I can access them in my .m file easily.
In this situation would it be acceptable to do this? Would adding ivars to the .h (for name and otherValues) cause any unusual behaviour in the persistance & retrieval of objects?