public class Category {
Set
}
public class Item {
Category category;
}
To remove an item from Category, you need to do this
category.getItems.remove(item1);
delete(item1); // delete() is from Hibernate API
The first line takes out the relationship while the second one deletes it.
No comments:
Post a Comment