Skip to content

Commit

Permalink
fix: onetoone 관게 객체 querydsl에 fetch 조인 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanna committed Jan 9, 2024
1 parent e020823 commit 24e5a42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public List<Booking> findAll(BookingSearchCondition condition, Pageable pageable
.selectFrom(booking)
.join(booking.payment, payment).fetchJoin()
.join(booking.time, eventTime).fetchJoin()
.leftJoin(booking.cancel).fetchJoin()
.where(createFilterCondition(condition))
.orderBy(createSortCondition(condition.getSortType()))
.offset(pageable.getOffset())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public void exitBooking(String id) {
ticketsWithSeat.forEach(ticket -> ticket.getSeat().updateStatus(EventSeatStatus.AVAILABLE));
}

@Transactional(readOnly = true)
public PageResponse<BookingsGetResponse> getBookings(
PageCondition pageCondition,
BookingSearchCondition searchCondition,
Expand All @@ -152,6 +153,7 @@ public PageResponse<BookingsGetResponse> getBookings(
);
}

@Transactional(readOnly = true)
public BookingGetResponse getBooking(String id, Long memberId) {
Member member = getMemberById(memberId);

Expand Down

0 comments on commit 24e5a42

Please sign in to comment.