This error occurs also in special mapping conditions:
27.07.2006 14:41:59 org.hibernate.AssertionFailure <init>
SCHWERWIEGEND: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: collection [database.structure.PGroup.Elements] was not processed by flush()
at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205)
at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:332)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:993)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:340)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
mapping one:
User to paramValues:
Code:
<set name="paramValues" table="ParameterValue" inverse="true" cascade="all,delete-orphan" [b]lazy="false"[/b]>
<key column="USER_FK_ID"/>
<one-to-many class="ParameterValue"/>
</set>
mapping two:
ParameterValue to user:
Code:
<many-to-one name="user" foreign-key="FK_PARAMVALUE_TO_USER">
<column name="USER_FK_ID" length="40"/>
</many-to-one>
if you load the paramvalues and the user over a criteria (which has the paramValues eager fetched) it will occur the error mentioned above.
I'm using ThreadLocal- and session-per-conversation Pattern
Best regards
Dominic