728x90
외부에서는
/**
* joinColumn participant id
*/
@ManyToOne
@JoinColumn(name = "participant_id")
private Participant participant;
로 선언 해줘서 participant id(외래키) 값을 가져오는데,
내부
pariticipant 쪽에서는 이 OneToMany를 안해줘도 됨 해보니.
'개발 > JPA' 카테고리의 다른 글
HelloController (0) | 2022.08.26 |
---|---|
Entity 클래스는 유의 사항 (0) | 2022.08.26 |
업데이트 시 code+1 (0) | 2022.08.26 |
jpa increaseCode (0) | 2022.08.26 |
@Builder (0) | 2022.08.26 |