| I trying to update version of hibernate from 5.2.12 to 5.3.2 When persisting parent-child, one-to-many relationship with cascade-all and orphan-removal true, the following HibernateException is thrown:
Caused by: org.hibernate.HibernateException: Don't change the reference to a collection with delete-orphan enabled : su.axada.hibernate.sandbox.model.DocumentA.lines
Exception is throwing only if flushMode = COMMIT, if I'll set it to AUTO exception will gone. One more important thing is: I use envers if I'll remove @Audited annotation then no matter what value has flushMode and exception will gone. I think that the successful persisting of an object should not depend on the value of flushMode when using envers. In attachment you can find test ceses in class JPAUnitTestCase |