From 0ce079d6c6899627584fbcc63bada2bad732b71f Mon Sep 17 00:00:00 2001 From: globox97 Date: Thu, 29 Feb 2024 16:00:58 +0100 Subject: [PATCH] crud-Location --- .../eps/softarch/demo/repository/LocationRepository.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); }