• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Core Data "Uniqueing" not happening as expected
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Core Data "Uniqueing" not happening as expected
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Crash in KVO when using -keyPathsForValuesAffecting<Key>
  • Next by Date: renaming executable files
  • Previous by thread: re: Cocoa and Computational Expense
  • Next by thread: Re: Core Data "Uniqueing" not happening as expected
  • Index(es):
    • Date
    • Thread