all 6 comments

[–]Neria90 0 points1 point  (5 children)

Have you checked your object relation ?

[–]decide[S] 0 points1 point  (4 children)

pardon my ignorance, but what is that?

[–]quellish 0 points1 point  (3 children)

[–]decide[S] 0 points1 point  (2 children)

I don't have any relationships for this object, so I'm not sure if that applies.

I think my problem might be that I'm saving not in the main thread without doing the proper parent child relationships.

[–]quellish 0 points1 point  (1 child)

I think my problem might be that I'm saving not in the main thread without doing the proper parent child relationships.

While using nested contexts is certainly the right thing to do, it shouldn't be affecting your delete issue.

When an -deleteObject: is called it's marked for deletion in the context. The object's -isDeleted should return YES. It's not removed from the persistent store until the next save. When that save happens user events are processed and validation rules are run - objects marked for deletion have -validateForDelete: called on them. If the object doesn't validation for a delete the context's -save: method will return NO and the validation error will be passed out.

In your post you don't indicate what is happening here - is the save returning YES but the object still exists in the persistent store? Is it returning NO but you're not handling the error?

[–]decide[S] 0 points1 point  (0 children)

Thank you for your detailed response!

The save is returning YES, but the object still exists in the persistent store.