Replies: 2 comments
-
|
JPA에서는 @manytomany를 사용하면 자동으로 중간 테이블을 만들어주지만, 실무에서는 거의 사용하지 않습니다. |
Beta Was this translation helpful? Give feedback.
0 replies
-
쉽게 이해하는 예시 예: 학생(Student)과 과목(Subject)
1. 로 구현하면? public class Student { private List<Subject> subjects; }
2. 실무에서는 이렇게 : public class StudentSubject { private Long id; private Student student; private Subject subject; private LocalDate enrolledDate; // 수강한 날짜 }
✅ 면접 TIP
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
😮
Beta Was this translation helpful? Give feedback.
All reactions