From 20bf7873942dfb7910a1021a2b34a1522e7bde4f Mon Sep 17 00:00:00 2001 From: inseo Date: Wed, 3 Jan 2024 11:38:22 +0900 Subject: [PATCH] =?UTF-8?q?optimize:=20=EB=9D=BC=EC=9A=B4=EC=A7=80=20left?= =?UTF-8?q?=20join=20fetch=20User(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/Matching/SouP/repository/LoungeRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SouP/src/main/java/Matching/SouP/repository/LoungeRepository.java b/SouP/src/main/java/Matching/SouP/repository/LoungeRepository.java index 88de865..92d7519 100644 --- a/SouP/src/main/java/Matching/SouP/repository/LoungeRepository.java +++ b/SouP/src/main/java/Matching/SouP/repository/LoungeRepository.java @@ -8,6 +8,6 @@ public interface LoungeRepository extends JpaRepository { - @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 findAllDesc(); }