|
While the use of "cascade-persist" in orm.xml is discouraged by the documentation, its behavior does not currently follow the JPA spec (from 2.1):
The cascade-persist subelement applies to all relationships in the persistence unit. Specifying this subelement adds the cascade persist option to all relationships in addition to any settings specified in annotations or XML.
In hibernate-core 4.3.5, the value of "cascade-persist" is not respected for relationships specified by annotations; for these annotations, the default cascade is an empty array even if "cascade-persist" is set in orm.xml.
I am submitting a pull request that fixes the issue, although I believe the method of the fix requires feedback.
|