checkTransactionNeededForUpdateOperation exception

JPA: jakarta.persistence.TransactionRequiredException: Executing an update/delete query org.hibernate.internal.AbstractSharedSessionContract.checkTransactionNeededForUpdateOperation

Fixed BugsJava

Problem: When you are using JPA and returns next error:

jakarta.persistence.TransactionRequiredException: Executing an update/delete query at org.hibernate.internal.AbstractSharedSessionContract.checkTransactionNeededForUpdateOperation

Solution: Just add @Transactional at class level of the repository that is failing.

Source: documentation

For more interesting tutorials & guides just check them HERE.

Leave a Reply

Your email address will not be published. Required fields are marked *