I have described a entity called A and a entity that subclasses A called B
I have a screen X that retrieves data and creates entities of type A and B. Then I have a screen Y that specifically retrieves data for entity B and updates entities of type B.
Screen X shows all entities of type A (so those also include the entities of type B) data using a NSFetchedResultsController and a UITableView. Screen Y shows all entities of type B using a NSFetchedResultsController and a UITableView.
The problem appears when: I first go to screen X, then persist the data (save the context), then go to screen Y and then go back to screen X. At this time the NSFetchedResultsController that drives the UITableView on screen X will show duplicate entries, namely the entries of type B that have been updated in screen Y are shown double.
So this only happens if the data is persisted and only seems to happen with encrypted core data, when switching to 'normal' NSSQLiteStoreType this error does not appear.
Hi,
I'm having a strange problem with using the NSFetchedResultsController. I have a database setup like described http://martiancraft.com/blog/2015/03/core-data-stack/.
I have described a entity called A and a entity that subclasses A called B
I have a screen X that retrieves data and creates entities of type A and B. Then I have a screen Y that specifically retrieves data for entity B and updates entities of type B.
Screen X shows all entities of type A (so those also include the entities of type B) data using a NSFetchedResultsController and a UITableView. Screen Y shows all entities of type B using a NSFetchedResultsController and a UITableView.
The problem appears when: I first go to screen X, then persist the data (save the context), then go to screen Y and then go back to screen X. At this time the NSFetchedResultsController that drives the UITableView on screen X will show duplicate entries, namely the entries of type B that have been updated in screen Y are shown double.
So this only happens if the data is persisted and only seems to happen with encrypted core data, when switching to 'normal' NSSQLiteStoreType this error does not appear.
Anybody knows on how to resolve this?