Re: CoreData - constraint?
Re: CoreData - constraint?
- Subject: Re: CoreData - constraint?
- From: Michael Hanna <email@hidden>
- Date: Fri, 1 Jul 2005 15:58:11 -0400
Thanks, I think I was getting this mixed-up with primary key
constraints.
To do this, you just need to hook up your Passage array
controller's "contentSet" binding. Hook it to your Entry array
controller, using a controller key of "selection" -- representing
the selected Entry, if any -- and a model key path of "passages".
Yes I gave that a shot. It gave me an NSInternalConsistencyException:
2005-07-01 15:51:55.960 Dreamer[1991] An uncaught exception was raised
2005-07-01 15:51:55.960 Dreamer[1991] Cannot create NSSet from object
<_NSControllerObjectProxy: 0x3a1420> of class _NSControllerObjectProxy
2005-07-01 15:51:55.961 Dreamer[1991] *** Uncaught exception:
<NSInternalInconsistencyException> Cannot create NSSet from object
<_NSControllerObjectProxy: 0x3a1420> of class _NSControllerObjectProxy
Dreamer has exited due to signal 5 (SIGTRAP).
How do I avoid this and what does this mean?
Michael
On 1-Jul-05, at 2:58 PM, Chris Hanson wrote:
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