persist « Version « JPA Q&A





1. Entity versioning in JPA + Hibernate    stackoverflow.com

I have a problem with entity versioning. Here's what I want to archive: Let's say that I have entity class A (POJO with javax.persistance.* annotations). It's in relations with other entities. Then ...

2. How can I get Hibernate to start version column at 1 for new objects?    stackoverflow.com

Does anyone know if it is possible to get Hibernate to use 1 for the version (optimistic locking field) of a new object instead of zero? My application previously used Eclipselink ...

3. @Version column gets updated even though persist was never called    stackoverflow.com

I've a database with two tables (more actually, but that shouldn't matter in this case). One of the two has a foreign key reference to the other. These could be the ...

4. Set does not contained retrieved version of persisted object    forum.hibernate.org

OK, I RTFM'd, made some adjustments and still have this problem. Code to follow. I create a persistable object. I add it to a set. I assert the set contains the object which passes. I save the object. I commit the transaction, close the session and reopen the session. I retrieve the Permission from the db into a new reference. I ...

5. problem with version value of persistent object    forum.hibernate.org

Hibernate will ignore value of version property of a persistent object, right? In our system, we update only a part of properties of entity by values received from UI(include version value). So we can not use POJO as DTO directly in UI. Each time to update, load the entity from DB(by id) and merge value from DTO to POJO, include version ...