I created my own class that I want Core Data to use instead of NSManagedObject
:
@interface MyManagedObject: NSManagedObject {
id delegate;
}
<
Don't use inheritance in your data model if you're using the SQL backend. Because of the implementation of the SQL backend, it has horrible performance and space characteristics. (This is Apple's recommendation.)
I may be wrong (I'll double-check), but I think you can do what you want using just the class and header files, without messing with the data model. (This is assuming you don't want to actually store your ivar in the data backend.) Just implement MyManagedObject
like you did, and make your subclasses inherent from MyManagedObject
instead of NSManagedObject
(e.g. Contact : MyManagedObject
). Note that you only have to do this in the header files, and not the actual data model. The compiler should figure out the rest.