Re: Data modeling, inheritance, and relationships
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