Skip to content

Commit

Permalink
Fix: JpaRunningRecordRepository.findByMemberIdAndStartAtBetween 메서드에서…
Browse files Browse the repository at this point in the history
… member 테이블을 fetch join하도록 수정 (#267)
  • Loading branch information
Jaewon-pro authored Oct 15, 2024
1 parent 91fe935 commit 9114a4b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.dnd.runus.infrastructure.persistence.jpa.running;

import com.dnd.runus.infrastructure.persistence.jpa.running.entity.RunningRecordEntity;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.OffsetDateTime;
Expand All @@ -10,10 +11,12 @@ public interface JpaRunningRecordRepository extends JpaRepository<RunningRecordE

void deleteByMemberId(long memberId);

@EntityGraph(attributePaths = {"member"})
List<RunningRecordEntity> findByMemberIdAndStartAtBetween(
long memberId, OffsetDateTime startTime, OffsetDateTime endTime);

boolean existsByMemberIdAndStartAtBetween(long memberId, OffsetDateTime startTime, OffsetDateTime endTime);

@EntityGraph(attributePaths = {"member"})
List<RunningRecordEntity> findByMemberId(long memberId);
}

0 comments on commit 9114a4b

Please sign in to comment.