re: core data subentities
re: core data subentities
- Subject: re: core data subentities
- From: Ben Trumbull <email@hidden>
- Date: Fri, 11 Jan 2008 16:37:48 -0800
At 2:52 PM -0800 1/11/08, email@hidden wrote:
If I am going to be importing data
corresponding to type SubOne, and then supplementing that with data
from SubTwo, how exactly does that work. Is a SubOne object a
SuperEntity with an additional attribute?
Yes. The relationship is analogous to a class and its ivars.
The relationship between a managed object and its entity is "is of".
A managed object cannot have multiple entities any more than an
object can have multiple classes.
"has a" relationships are denoted by attributes and relationships.
I haven't seen any indication of
how to handle subentities, or for that matter, an explanation of
whether the attributes in SuperEntity and those in the SubEntities
are considered part of one managed object or of separate managed
objects. So even using KVC it is unclear to me how you would be
referencing superentity and subentity attributes.
It's one managed object with the union of properties.
KVC references the attributes by name as with any other object. You
cannot create multiple properties of the same name within the same
branch of an inheritance hierarchy. In different branches of the
hierarchy, they are simply different attributes with the same name.
--
-Ben
_______________________________________________
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