Cascading a Child entity persist operation to its Parent entity
问题 I have a OneToMany association with two entities that I have set up using Hibernate annotations. The Child entity of this association has a composite primary key that consists of the foreign key parent column and another identifier childName . This seems to cause a "Referential integrity constraint violation" when I attempt to cascade a commit to the parent by saving the child entity. I have created a simple working example of the issue that abstracts away from the actual scenario that I am