• 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: How to create subentity object inheriting from superentity object in core data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create subentity object inheriting from superentity object in core data


  • Subject: Re: How to create subentity object inheriting from superentity object in core data
  • From: Leon Starr <email@hidden>
  • Date: Thu, 17 Sep 2009 09:56:21 -0700

NOW, I get it. Thanks! Problem solved.
(I knew you guys were seeing something I wasn't, so I'm glad I persisted - no pun* intended).


- Leon
*okay, intended

On Sep 17, 2009, at 9:49 , Quincey Morris wrote:

On Sep 17, 2009, at 09:21, Leon Starr wrote:

But if there is no @property/@dynamic for license in my Truck subclass, (only in the Auto subclasss) I cannot access thisTruck.license without getting a compiler error. Which makes total sense to me since one NSManagedObject subclass (Truck) is not inheriting from another (Auto) in objc. They each inherit from NSObject.

Nuh uh.

If the Objective-C classes are "Auto" and "Truck" (which are maybe the same names as your Core Data entities, although they don't *have* to match), then Auto *must* be a subclass of NSManagedObject:

	@interface Auto : NSManagedObject ...

and Truck *must* be a subclass of Auto:

	@interface Truck : Auto ...

That's what Ben meant when he said "class inheritance still applies normally". The whole point of the exercise is to make the Objective- C inheritance chain *match* the entity inheritance chain.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: 
 >Re: How to create subentity object inheriting from superentity object in core data (From: Ben Trumbull <email@hidden>)
 >Re: How to create subentity object inheriting from superentity object in core data (From: Leon Starr <email@hidden>)
 >Re: How to create subentity object inheriting from superentity object in core data (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: settings to build for 10.5 on 10.6?
  • Next by Date: Re: NSRunLoop issue
  • Previous by thread: Re: How to create subentity object inheriting from superentity object in core data
  • Next by thread: Re: How to create subentity object inheriting from superentity object in core data
  • Index(es):
    • Date
    • Thread