AssertionFailure « Collection « JPA Q&A





1. hibernate.AssertionFailure collection [] was not processed by flush()    coderanch.com

Hi all I've been getting the above error no matter what I try and do to solve it. THe collection in question is /** * @hibernate.set * cascade="none" * @hibernate.key * column="POLICY_STATUS_ID" * @hibernate.one-to-many * class="com.model.ods.PolicyStatusRestriction" */ public Set getRestrictedToRoles() { return this.restrictedToRoles; } I've removed the lazy="true" xdoclet tag from the collection heading. I've overridden the compateTo method to check ...

5. Touching (lazy)collection inside listener = AssertionFailure    forum.hibernate.org

The problem is that AbstractFlushingEventListener.performExecutions() can result in new CollectionEntrys being created (because listeners access lazy collections, etc...). These CollectionEntry objects are technically created during a flush but not when the PersistenceConext.flushing attribute is set. I looks safe to update AbstractFlushingEventListener.performExecutions() to: session.getPersistenceContext().setFlushing(true); try { session.getJDBCContext().getConnectionManager().flushBeginning(); // we need to lock the collection caches before // executing entity inserts/updates in order ...

6. Envers, AssertionFailure, Hibernate or my collections?    forum.hibernate.org

Author Message chris.simons Post subject: Envers, AssertionFailure, Hibernate or my collections? Posted: Tue Jan 06, 2009 5:30 pm Newbie Joined: Thu Aug 28, 2008 3:29 pm Posts: 5 Hibernate Gurus, I've successfully (mostly) added Envers integration into our JBoss Seam application. However, I am having an odd issues persisting some, but not all, collections. The issue only occurs when ...

7. AssertionFailure - Collection was not processed by flush()    forum.hibernate.org

I've got a class, GuestType, that includes a Role. When I save the GuestType, I have a validator to ensure that the Role is enabled: Code: @AssertTrue(message = "Role is disabled") public Boolean validateRole() { return this.getRole().isEnabled(); } When I load up a GuestType and attempt to save it, I get an exception: collection [com.example.orm.Role.Tags] was not processed ...