Re: Cocoa-dev Digest, Vol 5, Issue 44

  • Thank you.

    You say that its "one managed object with the union of properties."
    But if you want to set values via KVC, then are the items referenced as:

    for data imported from a file of SubOne records, and

    for data imported from a file of SubTwo records?

    Also, does this force me to use custom classes instead of

    ÔÚ Jan 11, 2008£¬11:48 PM£¬<cocoa-dev-request...> дµÀ£º

    >> 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.
previous month january 2008 next month
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today