开发者

hibernate foreign key

开发者 https://www.devze.com 2022-12-09 20:29 出处:网络
i have entity A that has foreign key to entity B,does entity B need to have foreign key back to entity A? if yes, how?

i have entity A that has foreign key to entity B, does entity B need to have foreign key back to entity A? if yes, how? coz entity B, id already used for primary key

entity A --> id, entity_a_name, foreign_key_entity_B 开发者_JAVA百科

entity B ---> id, entity_b_name


No, your mapping is fine as is.

0

精彩评论

暂无评论...
验证码 换一张
取 消