Re: CoreData - constraint?
Re: CoreData - constraint?
- Subject: Re: CoreData - constraint?
- From: Chris Hanson <email@hidden>
- Date: Fri, 1 Jul 2005 11:58:20 -0700
On Jul 1, 2005, at 11:11 AM, Chris Hanson wrote:
The relationship is not a *constraint* on the objects in your
object graph, it's just an expression of a possible association
between objects in your object graph.
I think I may have phrased this poorly.
The essence of what I'm getting at is that a relationship, if it
expresses a constraint at all, doesn't do so in the way I think you
expect. In other words, you may require that there be one or more
Passage instances in an Entry instance's "passages" relationship --
this is a constraint. However, it's really only a constraint on
Entry instances. It may be entirely valid for Passage instances to
exist completely apart from any Entry.
It also needs to be possible for both Passage and Entry instances to
exist apart from anything else just for practical reasons.
Otherwise, how would you create either an Entry or a Passage before
any relationship is established? The constraints that Core Data lets
you express are applied whenever validation is invoked (either on an
object or object graph basis), for example during save.
-- 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