How the two tags in hbm file are different one-to-one and many-to-one with unique="true"
?
I just learnt that to get bidirectional one to one mapping I need to use one to one tag on both hbm files. Can't I put many to one with unique="true"
on both sides(both hbm) to get bidirectional behaviour in hibernate ?
in this link ,I found
<!-- In One-to-one we cannot specify the foreign key column
that has to be filled up
<one-to-one name="person" class="PersonOTO_B" cascade="all"
constrained="true"> </one-to-one>
-->
<many-to-one name="person" column="P_ID" unique="true"
not-null="true" lazy="false" />
Is the above reason a valid one ?
Regards Jayendra