Cascade.ALL from non-owning entity side
问题 I have a @ManyToMany (bi-directional) relationship between Item and Category. class Item { @ManyToMany(cascade = CascadeType.ALL) Collection<Category> categories=new ArrayList<Category>(); } class Category { @ManyToMany(mappedBy="categories", cascade = CascadeType.ALL) Collection<Item> items=new ArrayList<Item>(); } I have specified CascadeType.ALL on both. Item is the owner. ManyToMany relationship would be mapped using a third table (Item_Category) When i create an item and add categories