• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
"Un-deleting" objects in an NSManagedObjectContext?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"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


  • Prev by Date: Re: GetProcessBundleLocation() -- no good in background agents!
  • Next by Date: Can NSTrackingArea rects be nested?
  • Previous by thread: Re: Help with implementing delegates
  • Next by thread: re: "Un-deleting" objects in an NSManagedObjectContext?
  • Index(es):
    • Date
    • Thread