kommentare
This commit is contained in:
1 parent
51d4e1b451
commit
47a3849220
1 file changed
+2
-2
@@ -18,9 +18,9 @@ public class ShoppingCategory extends ShoppingElement{
|
||||
|
||||
@NotBlank
|
||||
private String categoryName;
|
||||
@OneToMany(mappedBy = "category")
|
||||
@OneToMany(mappedBy = "category") //eine Liste hat mehrere Kategorien, diese sind mappedBy category (Feld in ShoppingItem) damit keine extra Tabelle erzeugt wird
|
||||
private List<ShoppingItem> itemsInCategory;
|
||||
@ManyToOne
|
||||
@ManyToOne //mehrere Kategorien (Many) gehören (to) einer Liste an (one)
|
||||
@JoinColumn(name="list_id", nullable = false)
|
||||
private ShoppingList shoppingList;
|
||||
|
||||
|
||||
Reference in new issue
Block a user