From 7ce75e4080b8a09bd162d266ae0ecb700977a76f Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Mon, 2 May 2016 09:34:20 -0500 Subject: [PATCH] HHH-10664 - Prep 6.0 feature branch - merge hibernate-entitymanager into hibernate-core (autoClear fix) --- .../src/main/java/org/hibernate/internal/SessionImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java index 0db77c06d7..6b73488f39 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java @@ -2346,7 +2346,7 @@ public final class SessionImpl log.tracef( "SessionImpl#afterTransactionCompletion(successful=%s, delayed=%s)", successful, delayed ); if ( !isClosed() ) { - if ( autoClear ) { + if ( autoClear ||!successful ) { internalClear(); } }