Skip to content

Commit

Permalink
refactor: #749 집계 함수 쿼리 최적화 (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonyj1022 authored Jan 1, 2024
1 parent bc5dd6a commit 8d9ca92
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ public List<ChatRoomAndMessageAndImageDto> findAllChatRoomInfoByUserIdOrderByLas
.select(auctionImage.id.min())
.from(auctionImage)
.where(auctionImage.auction.id.eq(auction.id))
.groupBy(auctionImage.auction.id)
)).fetchJoin()
.join(auction.lastBid).fetchJoin()
.leftJoin(message).on(message.id.eq(
JPAExpressions
.select(message.id.max())
.from(message)
.where(message.chatRoom.id.eq(chatRoom.id))
.groupBy(message.chatRoom.id)
)).fetchJoin()
.where(isSellerOrWinner(userId))
.fetch();
Expand Down

0 comments on commit 8d9ca92

Please sign in to comment.