I am using NSFetchedResultsController to track changes in the database, but when I add a new item locally, it fires 2 times. First time when creating an object, second time when context.save().
Now I have this
I don't need it first time as context was not saved yet and entity have temporary ID. So, how to make NSFetchRequest or NSPredicate skip entities with temporary IDs?
Now I have this
Code Block fetchedResultsController.fetchRequest.predicate = nil ... ... let newItem = Item(context: context) //controller fires right after this #1 ... ... context.save() // Fires here again #2
I don't need it first time as context was not saved yet and entity have temporary ID. So, how to make NSFetchRequest or NSPredicate skip entities with temporary IDs?