From 0c148586fec50f1e627e34cdb3520c9b7497f314 Mon Sep 17 00:00:00 2001 From: daolove0323 Date: Fri, 15 Nov 2024 11:43:24 +0900 Subject: [PATCH] =?UTF-8?q?[Weekly/11//Feacture/Event]=20=EC=9D=B4?= =?UTF-8?q?=EB=B2=A4=ED=8A=B8=20=EB=A0=88=ED=8F=AC=EC=A7=80=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=20JPQL=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ktc2/cokaen/wouldyouin/event/persist/EventRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ktc2/cokaen/wouldyouin/event/persist/EventRepository.java b/src/main/java/org/ktc2/cokaen/wouldyouin/event/persist/EventRepository.java index 4a48d468..2aaa6fb2 100644 --- a/src/main/java/org/ktc2/cokaen/wouldyouin/event/persist/EventRepository.java +++ b/src/main/java/org/ktc2/cokaen/wouldyouin/event/persist/EventRepository.java @@ -13,12 +13,12 @@ public interface EventRepository extends JpaRepository { @Query("SELECT E FROM Event E JOIN FETCH E.host " + "WHERE E.host.id = :hostId " - + "AND E.id > :lastId " + + "AND E.id < :lastId " + "ORDER BY E.id DESC") Slice findAllByHostIdOrderByEventIdDesc(Long hostId, Long lastId, Pageable pageable); @Query("SELECT E FROM Event E JOIN FETCH E.host " - + "WHERE E.id > :lastId " + + "WHERE E.id < :lastId " + "ORDER BY E.id DESC") Slice findAllByEventIdDesc(Long lastId, Pageable pageable);