"Un-deleting" objects in an NSManagedObjectContext?
"Un-deleting" objects in an NSManagedObjectContext?
- Subject: "Un-deleting" objects in an NSManagedObjectContext?
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 27 Mar 2009 16:24:09 -0600
I've tried reading TFM and searching TFW, but can't find a solution to
a little problem. I just noticed that, if -[NSManagedObjectContext
save:] fails due to a delete operation failing to validate, then the
object to delete remains in the deletedObjects set. How do I get it
out of that set without resetting the entire context? I don't want a
failed delete to stall future save operations, so I want to discard
the changes.
And before anyone points out the -validateForDelete: method, I can't
use that method, because it often fails to work correctly in my model
(I've found several cases where it returns NO when it should be
returning YES, and the context is able to delete the object anyway).
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden