JPA: which side should be the owning side in a m:n relationship?

后端 未结 6 1928
予麋鹿
予麋鹿 2020-12-30 08:12

Say, for example, I had two entities: Article and Tag (like in a typical blog). Each article can have many tags, and each tag can be used by many a

6条回答
  •  生来不讨喜
    2020-12-30 08:34

    Also it worths to mention that in JPA the owning-side does not imply the containing side or the side that owns the other entities. More about this here: In a bidirectional JPA OneToMany/ManyToOne association, what is meant by "the inverse side of the association"?

提交回复
热议问题