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

[Feat] 챌린지 참여 여부 API #82 #102

Merged
merged 3 commits into from
Sep 14, 2022
Merged

[Feat] 챌린지 참여 여부 API #82 #102

merged 3 commits into from
Sep 14, 2022

Conversation

kimyoungi99
Copy link
Collaborator

  • 챌린지 참여 여부 API입니다
  • res 예시 :
    "data": {
    "participation": false
    }

Comment on lines +44 to +46
public boolean checkParticipation(Long userId) {
return challengeParticipationRepository.existsByChallengerIdAndStatus(userId, CHALLENGING);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

existsByChallengerIdAndStatus 이거 Data JPA가 만들어주는 쿼리는 불필요한 join이 나가지 않나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거 지금 native query 달려있는 그거입니당

Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지나가다가 ㅜㅜ 들립니다

jpa 영역이아니다보니 PROTECTED말고 PRIVATE이어도 될듯해요

@Youhoseong Youhoseong merged commit b5a606c into main Sep 14, 2022
@Youhoseong Youhoseong deleted the issue-#82 branch November 9, 2022 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants