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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to