Re: Core Data: Instantiating linked entities
Re: Core Data: Instantiating linked entities
- Subject: Re: Core Data: Instantiating linked entities
- From: Chris Hanson <email@hidden>
- Date: Mon, 01 Sep 2008 18:19:12 -0700
On Sep 1, 2008, at 3:15 AM, Renaud Céroce wrote:
I read somewhere in Apple's doc that an object was responsible for
instantiating the other objects it depends on. It don't find it
logical
because I've already defined the relationships in the xcdatamodel
The reason it is logical is that your data model declares the
relationships that may exist between any Shape, any Color, and any
Rect. Not just between a specific Shape, a specific Color, and a
specific Rect.
Furthermore, each of your entities is a peer in your data model, not
subordinate to some main entity. Thus you might actually want to set
up your relationships such that the relationship from Color to Shape
is to-many; that would let you have one Color that's shared among
multiple Shapes.
-- Chris
_______________________________________________
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