Fix/#143 채팅 요약 정보가 제대로 집계되지 않는 문제 수정 #144
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤨 Motivation
🔑 Key Changes
🙏 To Reviewers
aggregate를 사용할때, 필드 명시가 아닌 Aggregation.group("roomId")(단순 그룹화)으로만 명시했던터라 애초에 roomId를 필드까지 가지고 오지 못하는 것이 맞았네요..
as("unreadCount");도 현재 dto 필드와 동일하지 못해 발생한 정말 간단한 문제였어요
왜 몰랐을까 싶은데.. 이런걸 캐치 못한건 스스로도 채찍질이 필요해보이네요
복잡한 쿼리를 관리를 위해 aggregate문을 처음 도입할때 제대로 이해하지못한게 가장 컸던 것 같습니다. 앞으로는 처음 사용해보는 구문도 제대로 이해 후 활용하도록 하겠습니다 🥹
간단한 문제일거라고는 짐작했고.. 집계 코드 쪽 원인을 찾고부터는 진짜 단순한 문제라 바로 해결했는데, 원인 파악을 위해 로컬 매칭 + 디버깅 환경 구성까지 시간이 조금 걸렸던 것 같습니다.
😇 매칭 환경 구성을 도와주신 @suhyun0918 수현님께 정말 감사드립니다!🙇♂️😭✨ 덕분에 바로 끝낼 수 있었네요👍