Skip navigation.
 
mlre: core data subentities
FROM : Ben Trumbull
DATE : Sat Jan 12 01:37:48 2008

At 2:52 PM -0800 1/11/08, <email_removed> 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

Related mailsAuthorDate
mlcore data subentities Daniel Child Jan 11, 21:29
mlRe: core data subentities mmalc crawford Jan 11, 22:41
mlre: core data subentities Ben Trumbull Jan 12, 01:37
mlre: core data subentities mmalc crawford Jan 12, 22:06
mlre: core data subentities mmalc crawford Jan 12, 22:08
mlRe: core data subentities Daniel Child Jan 16, 05:04