Skip to content

Commit

Permalink
Merge pull request #207 from Team-Capple/refactor/#206/notificationN+1
Browse files Browse the repository at this point in the history
[REFACTOR] Notification 조회 N+1 문제 해결
  • Loading branch information
jaewonLeeKOR authored Oct 2, 2024
2 parents 23277b9 + 41cd2a6 commit e5c61d7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import com.server.capple.domain.notifiaction.entity.Notification;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.time.LocalDateTime;

public interface NotificationRepository extends JpaRepository<Notification, Long> {
@EntityGraph(attributePaths = {"notificationLog"})
@Query("select " +
"n " +
"from Notification n " +
Expand Down

0 comments on commit e5c61d7

Please sign in to comment.