Replies: 2 comments
-
개념 설명🔸 "N:1(다대일)" 연관관계란?
예를 들어,
즉,
🔹 JPA에서 이 관계를 설계하는 방법1. 자바 클래스에서 필드로 연관 엔티티를 선언한다.
2. 사용된 애노테이션 설명
🔸 양방향 연관관계로 확장하는 방법 (
|
| 항목 | 핵심 요점 |
|---|---|
| 양방향 연관관계 | @manytoone이 주인, @onetomany(mappedBy=...)가 거울 |
| 외래키 위치 | 항상 다수(N) 쪽이 갖는다 |
| 무한 루프 방지 | @JsonIgnore or DTO로 응답 구조 분리 |
Beta Was this translation helpful? Give feedback.
-
모범 답변
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🤓
Beta Was this translation helpful? Give feedback.
All reactions