Collection was not processed by flush

Description

The fix eliminates the problem with LazyLoaded collections and OnPostUpdate event in custom event listener. When you trying to retrieve an object which has LazyLoaded collection during OnPostUpdate NHibernate throws the following exception:

NHibernate.AssertionFailure: collection [CollectionType] was not processed by flush()
at NHibernate.Engine.CollectionEntry.PostFlush(IPersistentCollection collection)
at NHibernate.Event.Default.AbstractFlushingEventListener.PostFlush(ISessionImplementor session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)

The full description on the problem can be found in Hibernate Jira:
https://hibernate.onjira.com/browse/HHH-2763

The is the same as for Hibernate - we need to fix AbstractFlushingEventListener.PerformExecutions and set
session.PersistenceContext.Flushing to true;
and before leaving return it to false.

The patch is attached.

Environment

None

Attachments

1

Activity

Show:

Oskar Berggren December 1, 2012 at 9:06 PM

Can someone also port the related tests from HHH-2763 (look at the Commits tab) please?

DmitryD November 28, 2012 at 2:41 PM

We're experiencing the same issue here reproduced by NHibernate.Search. Any thoughts on when it might be fixed?

AbleC September 24, 2012 at 8:10 PM

We are suffering from this problem - it appears to be triggered by NHibernate.Search while we are working IndexEmbedded / ContainedIn entities.

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?

Created July 20, 2012 at 8:24 AM
Updated October 12, 2017 at 11:26 AM
Who's Looking?