recovering from EOF error
recovering from EOF error
- Subject: recovering from EOF error
- From: Jonathan Rochkind <email@hidden>
- Date: Wed, 28 May 2003 13:31:09 -0500
I've asked this question before, but maybe someone has a new idea.
Let's say I have an editing context which has an object in it's
deletedObjects(). I call saveChanges(). I get an exception thrown. Let's
assume that I DO know how to parse the exception, and figure out that it
was due to the fact that the object to delete didn't exist in the db---that
is, it was probably deleted first by some other instance or non-WO process.
We're assuming I can figure this out. And I can figure out exactly which EO
it was. Now... how do I recover? How do I get the EC in a state where I
can call saveChanges() again, and it will try to save it's other changes
again, but won't try to commit the delete, because it somehow knows this
object has already been deleted?
Looking at the EOEditingContext references, I see a forgetObject method?
Would I maybe tell the EC to forget this object? But that doesn't seem
quite right, don't neccesarily want the EC to forget it entirely, and the
docs tell you never to call this. We just want the EC to know somehow that
it doesn't need to be deleted, cause it already doesn't exist, that the EC
can consider it already deleted, and not try to delete it again.
Any ideas?
--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.