From 507563f2afcbc504e60905caa78a52452bb851a7 Mon Sep 17 00:00:00 2001 From: jimmy0006 Date: Sun, 21 Jan 2024 22:24:33 +0900 Subject: [PATCH] fix:filter using boardType --- src/main/java/org/poolc/api/post/repository/PostRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/poolc/api/post/repository/PostRepository.java b/src/main/java/org/poolc/api/post/repository/PostRepository.java index 979f0b60..dd68abfb 100644 --- a/src/main/java/org/poolc/api/post/repository/PostRepository.java +++ b/src/main/java/org/poolc/api/post/repository/PostRepository.java @@ -15,7 +15,7 @@ public interface PostRepository extends JpaRepository, PagingAndSortingRepository, JpaSpecificationExecutor { Page findByMember(Member member, Pageable pageable); - @Query("select p from Post p where p.isDeleted=false") + @Query("select p from Post p where p.boardType=:boardType and p.isDeleted=false") Page findByBoardType(BoardType boardType, Pageable pageable); Page findByTitleContainingOrBodyContaining(String title, String body, Pageable pageable);