JPA: unidirectional many-to-one and cascading delete
If you are using hibernate as your JPA provider you can use the annotation @OnDelete. This annotation will add to the relation the trigger ON DELETE CASCADE, which delegates the deletion of the children to the database. Example: public class Parent { @Id private long id; } public class Child { @Id private long id; … Read more