After calling Session.save() with an entity, calling Session.flush() causes the following error.
org.hibernate.AssertionFailure: collection [com.example.myList] was not processed by flush()
The mapping used was:
<component name="component" class="Component">
<property name="sequence" column="SEQUENCE" not-null="false" generated="insert"/>
<list name="myList" table="MY_LIST">
<property name="element" column="ELEMENT"/>
It seems related to the fact that Hibernate is issuing a select to retrieve the generated properties of the component before persisting the list. EntityMetamodel.hasInsertGeneratedValues() returns true in 3.2.4, but in 3.1.3 it returns false and because of that 3.1.3 does not perform the select and you must explicitly call refresh().
Maybe it could cascade first and then get the generated values after?
If I set foundInsertGeneratedValue to false (with a debugger) in the EntityMetamodel's constructor before hasInsertGeneratedValues is set then the error no longer happens.
Test case to reproduce issue.
In an effort to clean up, in bulk, tickets that are most likely out of date, we're transitioning all ORM 3 tickets to an "Awaiting Test Case" state. Please see http://in.relation.to/Bloggers/HibernateORMJIRAPoliciesAndCleanUpTactics for more information.
If this is still a legitimate bug in ORM 4, please provide either a test case that reproduces it or enough detail (entities, mappings, snippets, etc.) to show that it still fails on 4. If nothing is received within 3 months or so, we'll be automatically closing them.
Bulk rejecting stale issues. If this is still a legitimate issue on ORM 4, feel free to comment and attach a test case. I'll address responses case-by-case. Thanks!