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