• 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: Data modeling, inheritance, and relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Data modeling, inheritance, and relationships


  • Subject: Re: Data modeling, inheritance, and relationships
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 20 Nov 2005 16:59:15 -0800

On Nov 20, 2005, at 6:13 AM, Timothy Larkin wrote:

Suppose I have an entity class, Field, which has a relationship, foo. Then I create another entity class, Subfield, which is a subclass of Field. I expect that Subfield will inherit the foo relationship as well as the other attributes of Field.

Do you mean "entity" or "class" above? They're distinct concepts, so it's important to distinguish between the two.


If you create an entity and then a subentity, the subentity will inherit all of the properties of its parent entity.

However, I have not been able to find any way in the XCode data modeler to attach Subfield to another entity using the foo relationship. If I create a relationship, foo, for Subfield, the data modeler compiler complains that Subfield.foo conflicts with Field.foo.

This is also correct. Your subentity inherits the relationship from its parent entity, which includes the relationship's destination entity.


Or is it the case that Subfield inherits the destination entity along with the relationship itself? Can Subfield direct the inherited relationship foo to an entity other than the destination entity of that relationship in the superclass, Field?

No, you need to create a new relationship in your subentity to do that.

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Data modeling, inheritance, and relationships (From: Timothy Larkin <email@hidden>)

  • Prev by Date: Re: What NSEvent contains text from Ink input? [Solution]
  • Next by Date: Re: NSPredicate performance considerations
  • Previous by thread: Data modeling, inheritance, and relationships
  • Next by thread: Problems with double freeing.
  • Index(es):
    • Date
    • Thread