Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
2.1.7
Suppose I have a bidirectional one-to-one mapping between classes A and B.
Following the model described in HIA, the mapping from A to B is a many-to-one with "unique=true". The mapping from B to A uses a one-to-one mapping with a "property-ref" attribute.
The db table for A (TABLE_A) has a foreign key (B_ID) into the table for B (TABLE_B).
Does the db table for B need a foreign key into the table for A? Said differently, does TABLE_B need A_ID?
HIA (p. 222 figure 6.7) implies that the second foreign key, the one that would link TABLE_B back to TABLE_A, is unnecessary. Is this correct?
thanks,
Miguel