Skip to content

Commit

Permalink
[Weekly/11//Feacture/Event] 이벤트 레포지토리 JPQL 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Daolove0323 committed Nov 15, 2024
1 parent cc0a883 commit 0c14858
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public interface EventRepository extends JpaRepository<Event, Long> {

@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<Event> 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<Event> findAllByEventIdDesc(Long lastId, Pageable pageable);

Expand Down

0 comments on commit 0c14858

Please sign in to comment.