This commit is contained in:
Technoir committed 2026-10-09 22:36:38 +02:00
1 parent 18ac0273bd
commit 080f61a0c8
2 files changed
+2 -2

No files matched your search

@@ -41,7 +41,7 @@ public class PageController {
public String list(Model model, @PathVariable UUID id){
ShoppingList list = shoppingListRepository.findById(id).orElseThrow();
model.addAttribute("list", list);
model.addAttribute("categories", shoppingCategoryRepository.findByShoppingList(list));
model.addAttribute("categories", shoppingCategoryRepository.findByList(list));
model.addAttribute("items", shoppingItemRepository.findByList_IdAndCategoryIsNull(id));
return "list";
}
@@ -22,6 +22,6 @@ public class ShoppingCategory extends ShoppingElement{
private List<ShoppingItem> itemsInCategory;
@ManyToOne //mehrere Kategorien (Many) gehören (to) einer Liste an (one)
@JoinColumn(name="list_id", nullable = false)
private ShoppingList shoppingList;
private ShoppingList list;
}