How do I delete orphan entities using hibernate and JPA on a many-to-many relationship?
- by user368453
I want to delete orphan entities using hibernate and JPA on a many-to-many relationship but all that I found was this atibute the attribute. org.hibernate.annotations.CascadeType.DELETE_ORPHAN ( i.e. @Cascade(value={org.hibernate.annotations.CascadeType.DELETE_ORPHAN) ), which works only for one-to-many relationships.
I want to know if I can delete the orphan ones on my many-to-many relationship.
I´d be happy if anyone could help me...
Thanks in advance !