Skip to content

Commit

Permalink
jqql 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Daolove0323 committed Nov 15, 2024
1 parent ef4b98e commit fe1bcd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
public interface ReservationRepository extends JpaRepository<Reservation, Long> {

@Query("SELECT R FROM Reservation R JOIN FETCH R.member JOIN FETCH R.event "
+ "WHERE R.member.id = :memberId AND R.id > :lastId "
+ "WHERE R.member.id = :memberId AND R.id < :lastId "
+ "ORDER BY R.id DESC")
Slice<Reservation> findByMemberIdOrderByReservationIdDesc(Long memberId, Long lastId, Pageable pageable);

@Query("SELECT R FROM Reservation R JOIN FETCH R.member JOIN FETCH R.event "
+ "WHERE R.event.id = :eventId AND R.id > :lastId "
+ "WHERE R.event.id = :eventId AND R.id < :lastId "
+ "ORDER BY R.id DESC")
Slice<Reservation> findByEventIdOrderByReservationIdDesc(Long eventId, Long lastId, Pageable pageable);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
public interface ReviewRepository extends JpaRepository<Review, Long> {

@Query("SELECT R FROM Review R JOIN FETCH R.member JOIN FETCH R.event "
+ "WHERE R.member.id = :memberId AND R.id > :lastId "
+ "WHERE R.member.id = :memberId AND R.id < :lastId "
+ "ORDER BY R.id DESC")
Slice<Review> findByMemberIdOrderByReviewIdDesc(Long memberId, Long lastId, Pageable pageable);

@Query("SELECT R FROM Review R JOIN FETCH R.member JOIN FETCH R.event "
+ "WHERE R.event.id = :eventId AND R.id > :lastId "
+ "WHERE R.event.id = :eventId AND R.id < :lastId "
+ "ORDER BY R.id DESC")
Slice<Review> findByEventIdOrderByReviewIdDesc(Long eventId, Long lastId, Pageable pageable);

Expand Down

0 comments on commit fe1bcd2

Please sign in to comment.