-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feat] 챌린지 참여 여부 API #82 #102
Conversation
public boolean checkParticipation(Long userId) { | ||
return challengeParticipationRepository.existsByChallengerIdAndStatus(userId, CHALLENGING); | ||
} |
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.
existsByChallengerIdAndStatus 이거 Data JPA가 만들어주는 쿼리는 불필요한 join이 나가지 않나요?
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.
요거 지금 native query 달려있는 그거입니당
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.
@query 달려있는 부분은 count의 문제네요 ㅎㅎ;;
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PROTECTED) |
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.
지나가다가 ㅜㅜ 들립니다
jpa 영역이아니다보니 PROTECTED말고 PRIVATE이어도 될듯해요
"data": {
"participation": false
}