Skip to content

Commit

Permalink
🐛 Fix: 일정에 관련된 activity와 join하는 로직에서 서브쿼리로 activity가 1개 이상 존재하는지에 대해 …
Browse files Browse the repository at this point in the history
…조회하는 로직으로 변경
  • Loading branch information
joowojr committed Nov 8, 2024
1 parent cec4480 commit b5d51d6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ public interface ParticipantRepository extends JpaRepository<Participant, Long>
"s.participantCount, " +
"s.participantNicknames, " +
"p.hasDiary, " +
"a.id) " +
" (SELECT a.id FROM Activity a WHERE a.schedule = s ORDER BY a.createdAt DESC LIMIT 1)) " +
"FROM Participant p " +
"LEFT JOIN Schedule s ON p.schedule = s " +
"LEFT OUTER JOIN Activity a ON a.schedule = s " +
"LEFT JOIN Member m ON p.member = m " +
"WHERE m.id = :memberId " +
"AND s.scheduleType = :scheduleType")
Expand Down

0 comments on commit b5d51d6

Please sign in to comment.