cometta
cometta

Reputation: 35719

hibernate foreign key

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
entity B ---> id, entity_b_name

Upvotes: 0

Views: 779

Answers (1)

KLE
KLE

Reputation: 24169

No, your mapping is fine as is.

Upvotes: 2

Related Questions