diff --git a/src/main/java/cat/udl/eps/softarch/demo/repository/LocationRepository.java b/src/main/java/cat/udl/eps/softarch/demo/repository/LocationRepository.java index b859c69a..10cc8bdc 100644 --- a/src/main/java/cat/udl/eps/softarch/demo/repository/LocationRepository.java +++ b/src/main/java/cat/udl/eps/softarch/demo/repository/LocationRepository.java @@ -1,14 +1,14 @@ package cat.udl.eps.softarch.demo.repository; import cat.udl.eps.softarch.demo.domain.Location; +import cat.udl.eps.softarch.demo.domain.Shelter; import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; -import java.util.List; @RepositoryRestResource -public interface LocationRepository extends CrudRepository, PagingAndSortingRepository { +public interface LocationRepository extends CrudRepository, PagingAndSortingRepository { - List findByIdContaining(@Param("shelter") String shelter); + Location findByShelterId(@Param("shelter_id") Long shelterId); }