cascade « Transaction « JPA Q&A





1. Session.lock() and cascade    forum.hibernate.org

It looks like the lock call on an object only cascades to its associated objects when cascade is set to "all". I'm using the lock method with LockMode.NONE to re-associate objects retrieved in previous Hibernate Session with subsequent Hibernate Sessions to allow the AuditInterceptor interface to see the previous values for these objects. (I'm using an AuditInterceptor to perform auditing and ...

2. Cascaded collections and LockMode.UPGRADE    forum.hibernate.org

3. locking and cascade    forum.hibernate.org

4. V3: Is cascade="lock" legal for collections? docs    forum.hibernate.org

STYLES.put("all", STYLE_ALL); STYLES.put("all-delete-orphan", STYLE_ALL_DELETE_ORPHAN); STYLES.put("save-update", STYLE_SAVE_UPDATE); STYLES.put("create", STYLE_CREATE); STYLES.put("merge", STYLE_MERGE); STYLES.put("lock", STYLE_LOCK); STYLES.put("refresh", STYLE_REFRESH); ...

5. cascade="lock" for a version check on associated i    forum.hibernate.org

Hibernate: insert into ManagedProperty (version, name) values (?, ?) Hibernate: insert into Residents (version, firstName, lastName, unit, property_id) values (?, ?, ?, ?, ?) Hibernate: insert into Residents (version, firstName, lastName, unit, property_id) values (?, ?, ?, ?, ?) Hibernate: update Residents set property_id=? where id=? Hibernate: update Residents set property_id=? where id=? Hibernate: select resident0_.id as id0_, resident0_.version as version0_, ...

6. Cascading updates when lock is called.    forum.hibernate.org

Hello all, Hibernate Version: 3 I'm fairly new to hibernate and ran across this problem today and was wondering if this functionality is intended (and why) or if it is a bug in Hibernate. I have a mapping of Object1 which contains a Set of Object2s. In the mapping document of Object1 I set the cascade mode of Object2 to 'save-update'. ...

7. Cascading Lock Issue    forum.hibernate.org

Hi, I have used an association mapping in one of my hbm.xml. I have used the cascade=lock but the locking mechanism doesnot cascade to associated objects. Could you let me know if there are any pre requisites for using cascade=lock Or if I need to look into other things. An example of my mapping is as follows In Company.hbm.xml