Details
Description
When you use a hibernate event, if you try accessing a lazy collection, then the CollectionEntry corresponding to the lazily loaded collection get added to the PersistenceContext and hibernate crashes when it finds those entries because they are neither processed, neither ignored.
The exception below is fired:
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
Please look for detailed comments about it at:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2763
Attachments
Issue Links
- clones
-
JBPAPP-5966 CLONE - HHH-2763: Unable to use bidiretional lazy relationship together with hibernate callback-listeners
- Resolved
-
JBPAPP-5995 DOCUMENT - HHH-2763: Unable to use bidiretional lazy relationship together with hibernate callback-listeners
- Closed