From 4200074595b2033b2ba8de32c61f44a892c8299b Mon Sep 17 00:00:00 2001 From: PicturePark1101 Date: Thu, 11 Jul 2024 21:29:25 +0900 Subject: [PATCH] [refactor] remove fetch join --- .../domain/favorite/repository/FavoriteRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/hankki/hankkiserver/domain/favorite/repository/FavoriteRepository.java b/src/main/java/org/hankki/hankkiserver/domain/favorite/repository/FavoriteRepository.java index 3bd81add..c5a19706 100644 --- a/src/main/java/org/hankki/hankkiserver/domain/favorite/repository/FavoriteRepository.java +++ b/src/main/java/org/hankki/hankkiserver/domain/favorite/repository/FavoriteRepository.java @@ -14,6 +14,6 @@ public interface FavoriteRepository extends JpaRepository { @Query("delete from Favorite f where f in :favorites") void deleteAll(@Param("favorites") List favorites); - @Query("select f from Favorite f join fetch f.user where f.id in :favoriteId") + @Query("select f from Favorite f where f.id in :favoriteId") List findByIds(@Param("favoriteId") List favoriteId); }