Hi hibernate developers,

testing Hibernate ORM 4.1.1 I discovered a behavior change regarding Optimistic 
Lock Versioning
in detail on bidirectional OneToMany relations with inverse-owner (mappedBy 
attribute specified):

- until Hiberante version 4.1.0 by default on changes both involved sides got a 
version increment 
- 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")
@org.hibernate.annotations.OptimisticLock(excluded=false)
@javax.persistence.MapKey(name="field1")
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 regard,
maybe I overlooked something ?


Würth Phoenix S.r.l.
Günther Demetz
Via Kravogl 4
I-39100 Bolzano 
E-Mail:     guenther.dem...@wuerth-phoenix.com
Website:  www.wuerth-phoenix.com



_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to