The old behavior violated JPA spec. The issue is HHH-7138
On Fri 09 Mar 2012 03:04:54 AM CST, Demetz, Guenther wrote:
Hi hibernate developers,
testing Hibernate ORM 4.1.1 I discovered a behavior change regarding Optimistic Lock
in detail on bidirectional OneToMany relations with inverse-owner (mappedBy attribute
- until Hiberante version 4.1.0 by default on changes both involved sides got a version
- now with Hiberante4.1.1 only the owner-side (=the Many-side) gets a version increment.
To make the thing working as before,
now on such relations we must define explicitly OptimisticLock.excluded=false
@javax.persistence.OneToMany(mappedBy = "parent")
private Map<String,Child> aggChild = new java.util.HashMap();
Was such behavior change intended?
I looked at the 28 issues which had been fixed with Hiberante4.1.1 but found nothing in
maybe I overlooked something ?
Würth Phoenix S.r.l.
Via Kravogl 4