0

I have a table view hooked up to a NSFetchedResultsController that is listening on an UIManagedDocument's managedObjectContext. Works fine. Now, I am creating a new object in a background context (whose parent is the UIManagedDocument's managedObjectContext). That object pops up in my table view as expected.

Now, at some later point I am updating that object I just created. I am updating it in the background context, but for some reason, once the update is done the table view actually shows two (duplicate) objects, instead of just one. I am confused why this is happening, but it must be due to using different contexts. In fact, I verified that I am only creating the object once (using insertObject:...).

Any idea on how to fix this? Thanks!

user1013725
  • 571
  • 1
  • 4
  • 17

1 Answers1

0

Known bug, with several different symptoms, including yours.

You need to acquire permanent IDs on the objects before saving to the parent context.

See this post for the details: Core Data could not fullfil fault for object after obtainPermanantIDs

Community
  • 1
  • 1
Jody Hagins
  • 27,943
  • 6
  • 58
  • 87