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

后端 未结 6 1948
予麋鹿
予麋鹿 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:31

    my point of view:

    it depends on your business. which entity is more important in your business.

    in your example, i think Article should be owning side,

提交回复
热议问题