hibernate/hibernate-orm — pull request #736 by gloshuertos (2014-05-02 21:40:22+00:00)
Title: HHH-9158: Apply cascade-persist in orm.xml to annotated relationships

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. This is not what is expected based on the JPA 2.1 spec.

I'm submitting this pull request, though I feel that stashing the "persist" cascade value in the defaultCascade of the Mappings is not the appropriate place to put it. I would like some guidance on what a better route of plumbing it through would be. I have verified the fix locally.