-
Notifications
You must be signed in to change notification settings - Fork 2
feat : ERD에 따른 엔티티 생성하기 #314 #315
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
Conversation
| @OneToMany(mappedBy = "limjangId", cascade = CascadeType.ALL, orphanRemoval = true) | ||
| private List<Record> recordList = new ArrayList<>(); | ||
| @OneToOne(mappedBy = "limjangId", cascade = CascadeType.ALL, orphanRemoval = true) | ||
| private SharedNote sharedNote; |
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.
@OnetoOne 관계여도 @onetomany - @manytoone으로 관계설정하는 것은 어떨지 의견드려봅니다..!
@OnetoOne 관계는 관계주인이 아닌쪽을 조회할 때 지연로딩이 되지 않더라구요!!
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.
현재 기존의 @OnetoOne 관계인 엔티티들도(Report 등등) 연관관계 주인이 아닌 쪽을 조회할 때 추가 쿼리가 나가고 있습니다!!
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.
제 부분 엔티티 확인했습니다!! 서진님 코멘트만 확인해주시고 수정해주시면 좋을 것 같습니다. 주선님 너무 감사드려요~!
- 기존의 OneToOne을 ManyToOne 으로 변경 - Lazy Loading 이 빠져있는 부분 추가
|
|
||
| @OneToOne(mappedBy = "limjangId", cascade = CascadeType.ALL, orphanRemoval = true) | ||
| private Report report; | ||
| @OneToMany(mappedBy = "limjangId", cascade = CascadeType.ALL, orphanRemoval = true) |
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.
OneToOne -> OneToMany 매핑 변경해주신 것 확인했습니다! 고생 많으셨습니다. 감사합니다.
feat : ERD에 따른 엔티티 생성하기 #314

ERD 에 맞게 엔티티 생성 및 수정 했습니다.
요청하신 바에 따라서, 임장과 주소는 연결은 해두지 않은 채, 만들어 두기만 했습니다.
확인하시고, Merge 부탁 드립니다.