I am using CascadeType.ALL but when I try to delete a record it just delete the record not its associated records.
@OneToMany(cascade = CascadeType.ALL)
@LazyCollection(LazyCollectionOption.FALSE)
public List<CartItem> getItems() {
return items;
}
My tables are
cart
cartitem
cart_cartitem
When I use the following it just remove the record of cart_cartitem not the record of cartitem.
cart.getItems().remove(0);
session.update(cart);