How do I delete orphan entities using hibernate and JPA on a many-to-many relationship?
Posted
by user368453
on Stack Overflow
See other posts from Stack Overflow
or by user368453
Published on 2010-06-16T16:45:43Z
Indexed on
2010/06/16
23:02 UTC
Read the original article
Hit count: 175
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 !
© Stack Overflow or respective owner