Hibernate 3.2.4SP1
Hello,
it seems for me, that touching any (lazy!) m:n collection inside an event-listener results in an AssertionFailure on PostFlush:
Code:
Caused by: org.hibernate.AssertionFailure: collection [com.qualitype.testcase.server.ejb.entity.EntityB.entitiesOfA] was not processed by flush()
at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205)
at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
... 29 more
Have created TestCase for demonstration: Two Entities with (lazy) m:n relationship between eachother, and a PostUpdateListener examining the (changed) collections of the relationship after update. See
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2763
Can somebody clarifiy that this is a bug ?