Re: optimistic locking recovery
Re: optimistic locking recovery
- Subject: Re: optimistic locking recovery
- From: Chuck Hill <email@hidden>
- Date: Tue, 21 Oct 2003 11:25:19 -0700
- Organization: Global Village Consulting, Inc.
I've never attempted this, but if I was to attempt it I would look at
EOEditingContext.forgetObject()
EOEditingContext.invalidateObjectsWithGlobalIDs()
EODatabaseContext.invalidateObjectsWithGlobalIDs()
EODatabaseContext.forgetSnapshotsForGlobalIDs()
Chuck
email@hidden wrote:
[demime could not interpret encoding binary - treating as plain text]
I try to update an EO. I get an optimistic locking exception. By
examining the exception, I'm able to determine that the EO in question
has been DELETED from the db by another process.
What's the proper way to recover from this? Sure, I can give the user a
message saying such. But meanwhile, there are potentially other
references to the EO in my app, including as the destination of various
to-one and to-many relationships.
Ideally, I'd like to somehow fix my object graph so it realizes this EO
has been deleted. It should be as if I did a deleteObject() on the EO,
and all the various notifications are sent all around so the object graph
behaves as if the EO has been deleted. Except I can't actually call
deleteObject, because this will just raise another exception, since the
object does not in fact exist.
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.
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
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.