HHH-13592 Populate AutoFlushEvent#isFlushRequired with the correct value

This commit is contained in:
Yoann Rodière 2019-08-20 11:47:19 +02:00 committed by gbadner
parent 618a502dac
commit 5fc6012449
1 changed files with 2 additions and 2 deletions

View File

@ -50,6 +50,7 @@ public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener
flushEverythingToExecutions( event );
if ( flushIsReallyNeeded( event, source ) ) {
LOG.trace( "Need to execute flush" );
event.setFlushRequired( true );
// note: performExecutions() clears all collectionXxxxtion
// collections (the collection actions) in the session
@ -65,10 +66,9 @@ public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener
}
else {
LOG.trace( "Don't need to execute flush" );
event.setFlushRequired( false );
actionQueue.clearFromFlushNeededCheck( oldSize );
}
event.setFlushRequired( flushIsReallyNeeded( event, source ) );
}
}
finally {