• 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 failure on insert
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimistic locking failure on insert


  • Subject: Re: Optimistic locking failure on insert
  • From: Ian Joyner <email@hidden>
  • Date: Thu, 16 Mar 2006 12:48:00 +1100

A really big thanks to Jerry and Chuck for expending a lot of effort on looking through this and debabating it. I'm trying to respond in as few short posts as possible, because I've probably already bored people to tears.

On 16/03/2006, at 2:31 AM, Jerry W. Walker wrote:

Hi, Ian,

I can't imagine (short of a bug in the development environment) how the code you're exposing below could cause an optimistic locking failure. The upshot of the code below only reads from the store. It neither creates nor updates any records therein.

Optimistic locking failures occur on an attempt to write a record to the database when the record on the database into which you're trying to write has data other than what you expected to be there. This is typically caused by someone else writing into the same record before you, but can also be caused by rounding errors in fields your checking for the optimistic locking check (e.g. including Doubles or Date fields among the optimistic lock check fields).

That's what gets me. I did have locking on on some date fields, but even turned it off on all attributes to no avail (how do you turn of optimistic locking altogether though, Inside EOM doesn't seem to explain that).

In looking over the debugging statements below, it looks like there is an attempt to save a member record which contains itself as a member. That is, it looks like the inserted record has the following recursive structure:


MemberRecord:
details = null
begin_date = 3/14/2006 @ 5:53:51 GMT
position = null
member = <self reference> ************ IS THIS CORRECT? ****************

Your analysis from the output is correct. But I'm not sure how that got there because there is no attribute or relationship called member in the model, or in added methods in the Java, so I think I was assuming this was some kind of internal WO thing, but perhaps it is strange?


(The closest thing is a reflexive relationship to the superclass person for 'contact').

Thanks
Ian

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Optimistic locking failure on insert (From: Ian Joyner <email@hidden>)
 >Re: Optimistic locking failure on insert (From: Ian Joyner <email@hidden>)
 >Re: Optimistic locking failure on insert (From: "Jerry W. Walker" <email@hidden>)

  • Prev by Date: Re: Optimistic locking failure on insert
  • Next by Date: Re: Optimistic locking failure on insert
  • Previous by thread: Re: Optimistic locking failure on insert
  • Next by thread: Re: Optimistic locking failure on insert
  • Index(es):
    • Date
    • Thread