HHH-13592 Populate AutoFlushEvent#isFlushRequired with the correct value
This commit is contained in:
parent
618a502dac
commit
5fc6012449
|
@ -50,6 +50,7 @@ public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener
|
||||||
flushEverythingToExecutions( event );
|
flushEverythingToExecutions( event );
|
||||||
if ( flushIsReallyNeeded( event, source ) ) {
|
if ( flushIsReallyNeeded( event, source ) ) {
|
||||||
LOG.trace( "Need to execute flush" );
|
LOG.trace( "Need to execute flush" );
|
||||||
|
event.setFlushRequired( true );
|
||||||
|
|
||||||
// note: performExecutions() clears all collectionXxxxtion
|
// note: performExecutions() clears all collectionXxxxtion
|
||||||
// collections (the collection actions) in the session
|
// collections (the collection actions) in the session
|
||||||
|
@ -65,10 +66,9 @@ public class DefaultAutoFlushEventListener extends AbstractFlushingEventListener
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG.trace( "Don't need to execute flush" );
|
LOG.trace( "Don't need to execute flush" );
|
||||||
|
event.setFlushRequired( false );
|
||||||
actionQueue.clearFromFlushNeededCheck( oldSize );
|
actionQueue.clearFromFlushNeededCheck( oldSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
event.setFlushRequired( flushIsReallyNeeded( event, source ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
|
Loading…
Reference in New Issue