0

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

  • "It gives error on save" - what error? An `NSError` object has at least an error code, and possibly a description or userInfo attached to it. Provide those and we can be more helpful. – Tim Feb 03 '10 at 18:26

2 Answers2

0

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.

Community
  • 1
  • 1
gerry3
  • 21,420
  • 9
  • 66
  • 74
0

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.enter image description here

Bhagyesh
  • 144
  • 1
  • 8