Executing an "update" query outside of a transaction using the code below was possible in Hibernate 5.1:
{code} entityManager.createNativeQuery("delete from Employee").executeUpdate(); {code}
After moving from Hibernate 5.1 to 5.3, encountering the failure below:
{code} ... javax.persistence.TransactionRequiredException: Executing an update/delete query at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1586) ... {code}
I tried adding {{hibernate.allow_update_outside_transaction=true}} (mentioned in the [5.2 migration notes|https://github.com/hibernate/hibernate-orm/blob/5.2/migration-guide.adoc]) to my {{persistence.xml}} but it didn't seem to make a difference. |
|