Open seivan opened 10 years ago
Hi @selvan, the best solution to your problem would probably be to nil
out the NSFetchedResultsController before you truncate all tables.
Another way to do this would be to use the suspendAutomaticTrackingOfChangesInManagedObjectContext
property on your controller (provided you're using standard boilerplate code) and fire off notifications when you're about to change the core data stack or have just changed it to set the property accordingly.
@seivan — in which context are you performing the truncation? Is it the main/default context, or the root saving context, or a child of either?
I'm having some issues with my NSFetchedResultsController. When the user logs out which fires off a truncate on all entities - that causes an exception in any controller that might currently be in the process of updating it's data.
The exception happens in;
Now I am sure it's my fault in the way I use Magical Record. Right now everything runs with
This happens after end of a network requests that has updated the existing entities.