How to remove deletedObjects from ManagedObjectContext?
I have two enities: path <-->>> node. (one to many) In nodes ArrayController I override -DeleteObjects: to remove path if the last node is removed.
Everything works perfect, but it's impossible to save edited document, because nodes are left in [ManagedObjectContext deletedObjcets].开发者_运维问答 It gives error on save. How to clean them up?
Babut
My understanding is that, during the save:
, the objects in deletedObjects
will be deleted. Their presence should not prevent a save.
Are you getting an error? Have you reviewed it detail? Perhaps use the method of error display from this answer to iphone Core Data Unresolved error while saving.
As you said, you have two entities with one to many relationship. If the delete rule is "Deny", deleting the entity will give an error until all of the related records in other entities are not deleted already.
精彩评论