Skip to content

Commit

Permalink
optimize: 라운지 N+1 연관관계 해결 (left join fetch) (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
in-seo authored Jan 3, 2024
2 parents 970403c + 67d9441 commit a90b873
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

public interface LoungeRepository extends JpaRepository<Lounge,Long> {

@Query(value = "select l from Lounge l left join fetch l.user")
@Query(value = "select l from Lounge l left join fetch l.user order by l.id desc")
List<Lounge> findAllDesc();
}

0 comments on commit a90b873

Please sign in to comment.