We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://umanking.github.io/2020/10/26/jpa-mapping-2/
The text was updated successfully, but these errors were encountered:
안녕하세요. 제법 오래된 글이긴 하지만 마지막 코드에서
team.getMembers().add(this); // team -> member
부분이 Null Point Exception을 부를 가능성이 있기 때문에
public void setTeam(Team team) { if (this.team != null) { this.team.getMembers().remove(this); } this.team = team; if (team != null) team.getMembers().add(this); }
이렇게 작성하는게 좋을 것 같습니다. 혹시나 다른분들이 참고하실때 도움 되었으면 해서 댓글 남깁니다
저도 덕분에 잘 참고했습니다. 감사합니다.
Sorry, something went wrong.
No branches or pull requests
[JPA] 연관관계 매핑 (연관관계 편의 메서드) | 앤드류’s 개발 블로그
https://umanking.github.io/2020/10/26/jpa-mapping-2/
The text was updated successfully, but these errors were encountered: