Skip to content

Commit

Permalink
Merge pull request #93 from KNU-HAEDAL/issue/#92
Browse files Browse the repository at this point in the history
[Feat]: findByIdWithChallenges 로직 left join으로 변경
  • Loading branch information
momnpa333 authored Sep 12, 2024
2 parents 6aae7bf + 60cc225 commit 8af45be
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.Optional;

public interface ChallengeGroupRepository extends JpaRepository<ChallengeGroup, Long> {
@Query("select cg from ChallengeGroup cg join fetch cg.challenges where cg.id = :challengeGroupId")

@Query("select cg from ChallengeGroup cg left join fetch cg.challenges where cg.id = :challengeGroupId")
Optional<ChallengeGroup> findByIdWithChallenges(Long challengeGroupId);
}

0 comments on commit 8af45be

Please sign in to comment.