IT'S DO
Published 2022. 8. 26. 13:45
Jpa에서 테이블 내부, 외부 개발/JPA
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
profile

IT'S DO

@멋진놈

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!