Re: Showing more than one entity in a tableview (Core Data)
Re: Showing more than one entity in a tableview (Core Data)
- Subject: Re: Showing more than one entity in a tableview (Core Data)
- From: "I. Savant" <email@hidden>
- Date: Thu, 8 Feb 2007 12:14:15 -0500
On Feb 8, 2007, at 11:39 AM, Sean McBride wrote:
Thanks I.S.! This seems to be working well. If I additionally
need to
use NSMangedObject subclasses should their class hierarchies follow
the
entity hierarchies? ie:
NSManagedObject - AnimalManagedObject - DogManagedObject
- CatManagedObject
That's a good question, actually, I can't remember if I read
anything that specifically addresses that in the documentation or
not. You may want to check that out.
Of course I'm a pedantic man, so if I had need to subclass
NSManagedObject for "Cat", I'd do it for "Dog" and "Animal" just for
completeness.
Come to think of it, that may be a sign of O.C.D. ... but it's
served me well in the past. :-)
There's one other approach I forgot to mention. If there's really
no fundamental difference between your "Animal" entities/subentities
other than what 'type' they are, then all you really need is a "type"
attribute (set to "Dog" or "Cat" or "One-Eyed One-Horned Flying
Purple People Eater").
--
I.S.
_______________________________________________
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