Core Data "Uniqueing" not happening as expected
Core Data "Uniqueing" not happening as expected
- Subject: Core Data "Uniqueing" not happening as expected
- From: Jerry Krinock <email@hidden>
- Date: Sun, 21 Jun 2009 06:26:28 -0700
My object graph in a Core Data document-based app shows the following
relationship.
Foo <<--> Bar
I insert a single Bar and two Foos, then
[foo1 setBar:bar] ;
[foo2 setBar:bar] ;
Save the document. [1]
Fetch all Bars.
Expected result: An array containing one Bar.
Actual result: An array containing two Bars that have the same
attributes, one related to foo1, the other related to foo2.
Am I reading the documentation incorrectly? How can I make
"uniqueing" happen?
Thanks,
Jerry Krinock
[1] At the end, the following article in the Core Data Programming
Guide implies that it may be necessary to "save" a document/moc in
order for "uniqueing" to occur, but I'm not sure. http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdFaultingUniquing.html#/
/apple_ref/doc/uid/TP30001202-185502-TPXREF148
_______________________________________________
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