refactor, findByList zu findByList_Id

This commit is contained in:
Technoir committed 2026-10-07 15:11:24 +02:00
1 parent 4bbbdf7d10
commit e4df4f492d
2 files changed
+2 -2

No files matched your search

@@ -54,7 +54,7 @@ public class PageController {
ShoppingList list = shoppingListRepository.findById(id).orElseThrow();
model.addAttribute("list", list);
model.addAttribute("categories", shoppingCategoryRepository.findByShoppingList(list));
model.addAttribute("items", shoppingItemRepository.findByListAndCategoryIsNull(list));
model.addAttribute("items", shoppingItemRepository.findByList_IdAndCategoryIsNull(id));
return "list";
}
}
@@ -9,6 +9,6 @@ import java.util.UUID;
public interface ShoppingItemRepository extends JpaRepository<ShoppingItem, UUID> {
List<ShoppingItem> findByListAndCategoryIsNull(ShoppingList list);
List<ShoppingItem> findByList_IdAndCategoryIsNull(UUID list);
List<ShoppingItem> findAllByCategory_Id(UUID categoryID);
}