Hi All,

I have had a problem suddenly appear on a form I'm working on and I can't for the life of me work out what I've done to cause it. Unfortunately I've done a lot of work on it since the last commit to the repository so I can't check that :-(

I am updating an entity that has optimistic locking implemented using an Integer version attribute.

When I trace the code through to the end of the "edit" method in my action, my pojo has a version number (let's say 4) that is passed through to the form, which is the same as the version number for that row in the DB. Peeking behind the scenes in my browser, I see the hidden version field also has the number 4. The trouble is, between somewhere between the end of the my Action's "edit" method and when the form has finished rendering in the browser, the entity's version number in the database has clicked over twice, and is now 6!

Of course, if I try and save my form now, I get Hibernate complaining that optimistic locking has failed.

I've hunted through my action (and it's ancestors) for somewhere where I might have been inadvertently pulling another copy (well, two copies) of the entity, but nothing found.

I'm guessing its something that OGNL is doing for me, but I can't see what I might have done to my JSP to cause this. Has anyone seen this kind of thing before that can give me a clue what I should be looking for?

Cheers,
Rob Hills
Waikiki, Western Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to