If you want deletes to work from both sides, you need to define a bi-directional relationship between Parent
and Child
:
// in Parent
@OneToMany(cascade=CascadeType.REMOVE, mappedBy="parent")
List<Item> children = new ArrayList<Child>();
// in Child
@ManyToOne
Parent parent;
ChssPly76
2009-07-23 23:19:56