session « Version « JPA Q&A





1. Hibernate query accessing previous version of data object?    stackoverflow.com

I have a piece of code using hibernate which behaves unexpectedly; after trying many different debugging strategies, I am wondering if my understanding of Hibernate sessions / mapped object updates is ...

2. how to overwrite version of an object known to the session    forum.hibernate.org

Hi I would like to overwrite the curent version of an loaded object. The problem is that Hibernate doesnt use the version field of my object. Hibernate stores the curent version in an EntityEntry object. How can I overwrite the version property in this object? Ralph PS: I can explain why I want to do this if it helps but this ...

3. Revisit - Many sessions with automatic versioning    forum.hibernate.org

I have the same issue as below, and seem no one provided an answer, I have the exact same situation. Basically, even i hardcod the setting of the version number to the object it seems that hibernate reads from the DB and i can see the call to Any idea? Thanks, Hadi ...

4. 10.4.2. Many sessions with automatic versioning    forum.hibernate.org

Humm... Not completely. I don't understand why a call to a setter after a call to the lock() method will perform an update. Indeed, I had a problem that had thrown a NonUniqueObjectException because I had executed a query that retrieved an object "Match" and after that I was trying to update this object after performing a change on it by ...

5. VERSIONING PROBLEM WITH OBJECT IN THE SAME SESSION    forum.hibernate.org

Hello all, I am using version field to ensure optimistic locking. It works just fine when the object is detached. Suppose record A is opened by user X & Y at the same time. X changes A and updates the data. version field of A is incremented by hibernate. now when Y wants to change and update A with the older ...