Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 모임 목록 조회 시 중복 데이터가 조회되는 오류 수정 #409

Closed
joowojr opened this issue Nov 8, 2024 · 0 comments · Fixed by #410
Closed

[Bug] 모임 목록 조회 시 중복 데이터가 조회되는 오류 수정 #409

joowojr opened this issue Nov 8, 2024 · 0 comments · Fixed by #410
Assignees
Labels
🐛 bug 버그 관련

Comments

@joowojr
Copy link
Contributor

joowojr commented Nov 8, 2024

⛔️Bug

모임 목록 조회 시 중복 데이터가 조회되는 오류가 발생

Bug Situation

모임 목록 조회 API 요청 시에 중복 데이터가 조회됨

Expected behavior

    @Query("SELECT new com.namo.spring.db.mysql.domains.schedule.dto.ScheduleSummaryQuery(" +
            "s.id, " +
            "p.customTitle, " +
            "s.period.startDate, " +
            "p.customImage, " +
            "s.participantCount, " +
            "s.participantNicknames, " +
            "p.hasDiary, " +
            "a.id) " +
            "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")

활동 존재 여부를 함께 조회는 로직을 추가하면서, 일정에 관련된 활동의 개수만큼 반환됨.

Screenshots

image

Version

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 버그 관련
Projects
None yet
1 participant