HHH-13262 - javax.persistence.TransactionRequiredException: Executing an update/delete query
This commit is contained in:
parent
ef3b07bd73
commit
a938d5838c
|
@ -189,7 +189,7 @@ public interface SharedSessionContractImplementor
|
||||||
*/
|
*/
|
||||||
default void checkTransactionNeededForUpdateOperation(String exceptionMessage) {
|
default void checkTransactionNeededForUpdateOperation(String exceptionMessage) {
|
||||||
if ( !isTransactionInProgress() ) {
|
if ( !isTransactionInProgress() ) {
|
||||||
throw getExceptionConverter().convert( new TransactionRequiredException( exceptionMessage ) );
|
throw new TransactionRequiredException( exceptionMessage );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont
|
||||||
@Override
|
@Override
|
||||||
public void checkTransactionNeededForUpdateOperation(String exceptionMessage) {
|
public void checkTransactionNeededForUpdateOperation(String exceptionMessage) {
|
||||||
if ( disallowOutOfTransactionUpdateOperations && !isTransactionInProgress() ) {
|
if ( disallowOutOfTransactionUpdateOperations && !isTransactionInProgress() ) {
|
||||||
throw getExceptionConverter().convert( new TransactionRequiredException( exceptionMessage ) );
|
throw new TransactionRequiredException( exceptionMessage );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue