]
Steve Ebersole closed HHH-1635.
-------------------------------
Closing stale resolved issues
optimistic locking doesn't work if you change version manually in
hibernate object
----------------------------------------------------------------------------------
Key: HHH-1635
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1635
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.0.5
Environment: Running on debian sarge (stable) linux with spring framework 1.2.7.
Reporter: Ryan
Essentially i am changing the version value in hibernate manually to an old version in
the process of copying modified values from a DTO/View object. I use the version value
from when I originally requested the view dto data. From my point of view, I would expect
that this would cause Optimistic locking exceptions when the data/version was already
changed by another client update. This seems like a common pattern. It does not work in
this manner, it seems to always use the version in cache from the load and only consider
the version change i make as an updage value rather then an actual change to the version.
It seems to me if hibernate intends to just ignore my version changes completely then
what is the point of us even having a version property in our beans, why doesn't
hibernate just use like a proxy and completely automate versioning, it is like it is
teasing us with a property that is there but we can't use?
I have asked this problem in the forum and I have seen it asked before in both the forum
and the bug tracker. I have spent some time searching for a detailed explination of why
this doesn't work how I would expect it to and can't.
The topic in the forum I have opened.
http://forums.hibernate.org/viewtopic.php?t=957539&highlight=&sid...
PLEASE before you reject this i would appreciate and explination i really searched the
forums heavily but couldn't find anything explaining this. Clearly I must not
understand transaction management and optimistic locking as well as I should, and I just
don't understand why this doesn't work like I am intending it to.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: