Skip to content

Commit

Permalink
프로젝트 및 스터디 스크랩 쿼리 수정
Browse files Browse the repository at this point in the history
- fetch join -> left fetch join
  • Loading branch information
DEREVGEN committed Oct 26, 2023
1 parent a9f9f74 commit 04841f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface ProjectScrapRepository extends JpaRepository<ProjectScrap, Long
Optional<ProjectScrap> deleteByProjectId(Long projectId);


@Query(value = "select distinct p from ProjectScrap ps inner join Project p on ps.project = p join fetch p.techStacks where ps.member = :member")
@Query(value = "select distinct p from ProjectScrap ps inner join Project p on ps.project = p left join fetch p.techStacks where ps.member = :member")
List<Project> findProjectByMemberWithTechs(@Param("member") Member member);

Optional<ProjectScrap> findProjectScrapByMemberAndProject(Member member, Project project);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public interface StudyScrapRepository extends JpaRepository<StudyScrap, Long> {

Optional<StudyScrap> deleteByStudyId(Long studyId);

@Query(value = "select distinct s from StudyScrap ss inner join Study s on ss.study = s join fetch s.techStacks where ss.member = :member")
@Query(value = "select distinct s from StudyScrap ss inner join Study s on ss.study = s left join fetch s.techStacks where ss.member = :member")
List<Study> findStudyByMemberWithTechs(@Param("member") Member member);

Optional<StudyScrap> findStudyScrapByMemberAndStudy(Member member, Study study);
Expand Down

0 comments on commit 04841f5

Please sign in to comment.