• 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
Re: optimistic locking recovery
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >optimistic locking recovery (From: email@hidden)

  • Prev by Date: Re: mandatory relatoinship preventing deletion?
  • Next by Date: Re: optimistic locking recovery
  • Previous by thread: optimistic locking recovery
  • Next by thread: Re: optimistic locking recovery
  • Index(es):
    • Date
    • Thread