HHH-13262 - javax.persistence.TransactionRequiredException: Executing an update/delete query

This commit is contained in:
Gail Badner 2019-02-24 17:01:05 -08:00 committed by gbadner
parent ef3b07bd73
commit a938d5838c
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ public interface SharedSessionContractImplementor
*/
default void checkTransactionNeededForUpdateOperation(String exceptionMessage) {
if ( !isTransactionInProgress() ) {
throw getExceptionConverter().convert( new TransactionRequiredException( exceptionMessage ) );
throw new TransactionRequiredException( exceptionMessage );
}
}

View File

@ -395,7 +395,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
@Override
public void checkTransactionNeededForUpdateOperation(String exceptionMessage) {
if ( disallowOutOfTransactionUpdateOperations && !isTransactionInProgress() ) {
throw getExceptionConverter().convert( new TransactionRequiredException( exceptionMessage ) );
throw new TransactionRequiredException( exceptionMessage );
}
}