kommentare

This commit is contained in:
Technoir committed 2026-10-06 16:47:55 +02:00
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;