How do I delete orphan entities using hibernate and JPA on a many-to-many relationship?

后端 未结 4 1634
猫巷女王i
猫巷女王i 2020-12-30 22:54

I want to delete orphan entities using hibernate and JPA on a many-to-many relationship but all that I found was this attribute the attribute. org.hibernate.annotations.Casc

4条回答
  •  醉梦人生
    2020-12-30 23:13

    So far there is no orphanRemoval attribute for the ManyToMany annotation. I have the same problem too. And the suggestion to implement it to on the database is no answer to the problem. The whole philosophy of JPA is against implementing logic on the database, but through the mappings.

提交回复
热议问题