• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Showing more than one entity in a tableview (Core Data)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Showing more than one entity in a tableview (Core Data) (From: "Sean McBride" <email@hidden>)
 >Re: Showing more than one entity in a tableview (Core Data) (From: "I. Savant" <email@hidden>)
 >Re: Showing more than one entity in a tableview (Core Data) (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: WWDC 2007
  • Next by Date: Cocoa fonts anti-aliasing issues
  • Previous by thread: Re: Showing more than one entity in a tableview (Core Data)
  • Next by thread: Default NSSavePanel filename selection not to include filename extension
  • Index(es):
    • Date
    • Thread