Re: Core Data : Undo Delete : Cannot fulfill a fault
Re: Core Data : Undo Delete : Cannot fulfill a fault
- Subject: Re: Core Data : Undo Delete : Cannot fulfill a fault
- From: Jim Correia <email@hidden>
- Date: Fri, 30 Sep 2011 00:17:41 -0700
On Sep 30, 2011, at 12:06 AM, Quincey Morris wrote:
> The actual failure scenario I described has 2 necessary conditions. One is a save boundary. The other is the flushing of cached property information for the deleted object. The latter is difficult to cause, especially in a trivial example, since there's no API for affecting the cache directly, except for resetting the MOC, which would probably break undo for different reasons.
>
> I guess the question here is this:
>
> If it's true that deleting a managed object causes it to be turned into a fault at some point (at the next save boundary at the latest), and saving a managed context with a deleted object actually causes the object's persistent representation to be deleted from the persistent store, and post-save the object is still referenced by an undo action, what possible mechanism can re-populate the object's properties if the undo action is undone? By definition, the necessary information no longer exists.
You are assuming that the only place this information can exist is in the row cache itself. The information can exist anywhere. At the risk of over-trivializing the problem—It’s just code™.
All the information necessary to resurrect the object (or restore properties) can be stored on the undo stack itself.
—Jim_______________________________________________
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