Re: CoreData sub-classing
Re: CoreData sub-classing
- Subject: Re: CoreData sub-classing
- From: Steve Israelson <email@hidden>
- Date: Fri, 8 Jun 2007 14:05:27 -0700
But I do NOT have any such class.
Are you saying in order to make a custom class you must also then
make all the sub-classes?
On 8-Jun-07, at 2:03 PM, Marcus S. Zarra wrote:
Your data model the Circle and Square should be set to the classes
they are (Circle and Square), not to NSManagedObject.
NSManagedObject is the default and you can set them to any
appropriate subclass as you wish.
Marcus S. Zarra
Zarra Studios LLC
www.zarrastudios.com
Simply Elegant Software for OS X
On Jun 8, 2007, at 2:54 PM, Steve Israelson wrote:
I have a CoreData Entity of, say, GraphicObject. It has several
sub-class entities in the data model of Circle and Square.
Now, I want to make an Objective-C subclass of GraphicObject to
cache the graphic image.
In the data model editor I set the class of GraphicObject to my
Objective-C class.
Circle and Square are still set to the class of ManagedObject.
In my code when I add Circle or Square entities to the context, I
get an exception of them being the wrong class.
So, hmm, I set their class to my Objective-C too.
I still get exceptions thrown.
So, my question is, HOW do I have a data model that uses
inheritance and is also implemented using custom classes in
Objective-C?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden