Skip to content

Commit 47cfcbf

Browse files
committed
CLAP-393 Fix : FETCH JOIN 제거
1 parent 6e0cfa4 commit 47cfcbf

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/java/clap/server/adapter/outbound/persistense/repository/notification/NotificationRepository.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,15 @@
1616
public interface NotificationRepository extends JpaRepository<NotificationEntity, Long> {
1717

1818
@Query("SELECT n FROM NotificationEntity n " +
19-
"JOIN FETCH n.task t " +
20-
"JOIN FETCH n.receiver r " +
2119
"WHERE n.receiver.memberId = :receiverId " +
22-
"AND t.isDeleted = false " +
20+
"AND n.task.isDeleted = false " +
2321
"ORDER BY n.createdAt DESC")
2422
Slice<NotificationEntity> findAllByReceiver_MemberIdOrderByCreatedAtDesc(
2523
@Param("receiverId") Long receiverId, Pageable pageable);
2624

2725
@Query("SELECT n FROM NotificationEntity n " +
28-
"JOIN FETCH n.task t " +
29-
"JOIN FETCH n.receiver r " +
3026
"WHERE n.receiver.memberId = :receiverId " +
31-
"AND t.isDeleted = false ")
27+
"AND n.task.isDeleted = false")
3228
List<NotificationEntity> findAllByReceiver_MemberId(Long memberId);
3329

3430
Integer countByIsReadFalseAndReceiver_MemberId(Long memberId);

0 commit comments

Comments
 (0)