Q:

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

A:

No, your mapping is fine as is.

