-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature] 모임 신청자 조회하기 API #168
Conversation
- 경로 추가 - swagger 작성 - dto 적용
private async getApplicationWithUserInfo(group: Group) { | ||
const allApplication = | ||
await this.groupApplicationRepository.findAllApplicationByGroup(group.id); | ||
|
||
const applicationWithUserInfoList = allApplication.map( | ||
async (application) => { | ||
const user = await application.user; | ||
return ApplicationWithUserInfoResponse.from( | ||
UserInfo.from(user), | ||
application, | ||
); | ||
}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위와 같은 상태에서는 N+1 Problem
이 발생할 것 같습니다.
현재 순서가 해당 모집게시글의 모집 신청 정보들을 가져오고 각각 정보들에 맞는 유저 데이터를 가져오는데 이렇게되면 신청한 유저수가 N명이면 N+1개의 쿼리가 발생하게 될 것 같아요.
처음에 조회해 올 때 부터 함께 조회해오도록 수정하면 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
학습하고 반영했습니다!
감사합니다!!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨어요!
체크 리스트
작업 내역