Is there a way to map a unidirectional one-to-one relationship using a unique foreign key constraint where the foreign key column resides in the table for the target of the relation instead of the source? For example, consider the bidirectional relationship in the documentation, section 5.1.11:
Code:
Alternatively, a foreign key with a unique constraint, from Employee to Person, may be expressed as:
<many-to-one name="person" class="Person" column="PERSON_ID" unique="true"/>
And this association may be made bidirectional by adding the following to the Person mapping:
<one-to-one name"employee" class="Employee" property-ref="person"/>
How can you model the same relationship if the Employee class has no property pointing back to the person (the many-to-one prop doesn't exist)?
Dave[/code]