Re: Core Data SQL store looses data that XML store does not
Re: Core Data SQL store looses data that XML store does not
- Subject: Re: Core Data SQL store looses data that XML store does not
- From: Scott Ellsworth <email@hidden>
- Date: Wed, 10 Aug 2005 17:52:36 -0700
On Aug 10, 2005, at 5:37 PM, mmalcolm crawford wrote:
On Aug 10, 2005, at 12:08 PM, Scott Ellsworth wrote:
I believe I was led astray by "It is possible, however, for
relationships to be navigable in only one direction—for there to
be no inverse relationship. If, for example, you are never
interested in finding out from a department object what employees
are associated with it, then you do not have to model that
relationship." from the data modelling guide.
The Data Modeling Guide is not specific to Core Data (it also
presents information relevant to Cocoa bindings). From the
"Inverse Relationships" section of the Core Data Programming Guide:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/
Articles/cdRelationships.html#//apple_ref/doc/uid/TP40001857/
DontLinkElementID_21>
That makes sense. Were it my call, I might put that URL in the data
modeling guide.
The CDPG has certainly improved since I first looked at it many moons
ago - the section on manipulating toOne and toMany relationships is
now quite clear, and I had not known that one could have an optional
relationship with a nonzero minimum bound.
*If you do not, however, you may need to do additional work to
ensure the consistency of the object graph."
I am not going to go down this route, as I believe I can create an
invertible relationship with the creation of another entity.
That said, how would one do the additional work? The failure I ran
into seems to be happening at a level below what I have access to.
Implement the awakeFromInsert method?
It typically only makes sense to model a to-one relationship in one
direction.*"
I might strengthen this statement. It is a devil of a bug to find,
so perhaps 'Modelling a toMany in only one direction is strongly
discouraged. It typically ..."
Scott _______________________________________________
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