I have managed to get this to work - I seem to have done exactly as you did. Please make sure, before you test everything, that you
re-create the db schema.
My Person mapping contains:
Code:
<one-to-one name="address" cascade="all"/>
My address mapping contains:
Code:
<id name="id" column="ADDRESS_ID">
<generator class="foreign">
<param name="property">person</param>
</generator>
</id>
<one-to-one name="person" constrained="true"/>
My init code is:
Code:
person = new Person();
address ad = new Address();
ad.setPerson(person);
person.setAddress(ad);
session.save(person);