Hibernate version:
Hibernate 3
I have implemented optimistic lock (version) strategy an it works.
But how can I resolve the collison after the Stale... Exception.
I have some strategies. One is to ignore the exyecption an override
the actual database record. But how can I do this ?
First I have set the version attribute in the stale object to the actual object
and call session.saveOrUpdate(). But I got the execption again.
The I have refresh the stale object, session.refresh() but I got the
stale exception.
Also session. replicate does not work ?
How can I resolve the collison in hibernate.
The solution is not to close the session and load all the date new, because
I have a long conversation.
Best Regards
michael
|