JPA @JoinColumn annotation with One To One relationship
问题 Is it true that @JoinColumn can be used on both side of One to One relationship in JPA ? I was under impression that it should be always used in owning side of One to One relationship as owning side will have foreign key column and this annotation define the attribute of foreign key column . Please clarify if my understanding is not correct . Edit #1 - I wanted to know , In which scenario we will be using @JoinColumn annotation on both side of one to one relationship ? 回答1: The OneToOne