What is referencedColumnName used for in JPA?

前端 未结 5 603
不知归路
不知归路 2020-11-29 19:42

In JPA there is an attribute called referencedColumnName that can be set on @JoinColumn, @PrimaryKeyJoinColumn what is the idea behind this setting

5条回答
  •  执笔经年
    2020-11-29 20:25

    For a JPA 2.x example usage for the general case of two tables, with a @OneToMany unidirectional join see https://en.wikibooks.org/wiki/Java_Persistence/OneToMany#Example_of_a_JPA_2.x_unidirectional_OneToMany_relationship_annotations

    Screenshot from this WikiBooks JPA article: Example of a JPA 2.x unidirectional OneToMany relationship database

提交回复
热议问题