title: Hibernate/GORM: collection was not processed by flush()
body: <p>I have an integration test in my Grails application that fails when I try to save an entity of type <code>Member</code></p>
  
  <pre><code>invitingMember.save(flush: true)
  </code></pre>
  
  <p>This raises the following exception</p>
  
  <blockquote>
    <p>org.hibernate.AssertionFailure:
    collection
    [com.mycompany.facet.Facet.channels] was
    not processed by flush() at
    com.mycompany.member.MemberConnectionService.addOrUpdateContact(MemberConnectionService.groovy:939)</p>
  </blockquote>
  
  <p>Earlier in the transaction I add an object to a collection property of <code>invitingMember</code>. My guess is that the exception is thrown at the line above, because it's only at this point that the object added to the collection is persisted.</p>