Skip to content

Commit

Permalink
optimize: 라운지 left join fetch User(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
in-seo committed Jan 3, 2024
1 parent cde3c6a commit 20bf787
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("select l from Lounge l left join fetch User u where l.user.id = u.id order by l.id DESC")
@Query(value = "select * from lounge l left join user u on u.user_id = l.user_id", nativeQuery = true)
List<Lounge> findAllDesc();
}

0 comments on commit 20bf787

Please sign in to comment.