package devopsdistilled.operp.server.data.repo.stock;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import devopsdistilled.operp.server.data.entity.items.Item;
import devopsdistilled.operp.server.data.entity.stock.Stock;
import devopsdistilled.operp.server.data.entity.stock.Warehouse;

@Repository
public interface StockRepository extends JpaRepository<Stock, Long> {

	Stock findByItemAndWarehouse(Item item, Warehouse warehouse);

}

@@ -48,16 +48,40 @@
 stock;%0A%0A
+import java.util.List;%0A%0A
 import o
@@ -519,10 +519,62 @@
 ouse);%0A%0A
+%09List%3CStock%3E findByWarehouse(Warehouse warehouse);%0A%0A
 %7D%0A

Declare findByWarehouse()