-
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
[Fix/98] 회원가입 로직 수정 #106
[Fix/98] 회원가입 로직 수정 #106
Conversation
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.
고생하셨습니다!
@@ -32,8 +33,10 @@ public void setMember(Member member) { | |||
this.member.getMemberChampionList().remove(this); | |||
} | |||
this.member = member; | |||
if (this.member.getMemberChampionList() == null) { |
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.
혹시 여기에서 이 조건을 추가하신 이유가 있으신가요?
@OneToMany(mappedBy = "member", cascade = CascadeType.ALL) private List<MemberChampion> memberChampionList = new ArrayList<>();
member 엔티티에서 이렇게 초기화를 해 주어서 저는 memberChampionList가 null인 경우가 없을 거라고 생각했었는데 혹시 이 조건+코드가 없으면 뭔가 오류가 나는건지 궁금합니다..!
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.
네ㅠㅠ 이상하게 @onetomany를 했음에도 불구하고 이런 에러가 발생하더라구요..
Cannot invoke "java.util.List.add(Object)" because the return value of "com.gamegoo.domain.Member.getMemberChampionList()" is null
그래서 추가했습니다!
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.
고생하셨습니다!
🚀 개요
회원가입 로직 수정
🔍 변경사항
⏳ 작업 내용
📝 논의사항