NSFetchedResultsChangeInsert reported when only updates are taking place
Posted
by niblha
on Stack Overflow
See other posts from Stack Overflow
or by niblha
Published on 2010-06-17T22:04:54Z
Indexed on
2010/06/18
6:33 UTC
Read the original article
Hit count: 224
core-data
I have a class that acts as a NSFetchedResultsControllerDelegate which is receiving messages to -(void)controller:didChangeObject:atIndexPath:forChangeType:newIndexPath: with change type NSFetchedResultsChangeInsert, but the actual object which is the subject has with certainty not been newly inserted, only updated. So I would expect to get a change message with type NSFetchedResultsChangeUpdate, should I not?
If i check the value of isInserted on the object, it yields false (as expected from the logic in my program). So my question is, why is this reported as an insert when it is only a change/update?
They only thing I can think of is that part of the changes that are taking place is that objects of another entity type are inserted with relationships to objects of the entity type that the NSFetchedResultsController is set up to fetch.
© Stack Overflow or respective owner