Hi
How about the below mapping?
Mapping for Parent <class name="Person">
<id name="id" column="personId">
<generator class="native"/>
</id>
<one-to-one name="address" class="org.compname.Address" cascade="all"></one-to-one>
</class>
Mapping for Child
<class name="Address">
<id name="id" column="addressId">
<generator class="foreign">
<param name="property">personId</param>
</generator>
</id>
<one-to-one name="personId" class="org.compname.Person" constrained="true"></one-to-one>
</class>
For more info on unidirectional one-to-one association look in to this
http://www.hibernate.org/hib_docs/v3/re ... tional-121
And one Question?
Why do u use SaveOrUpdate when you clearly know that what action you have to perfom i.e) insert or update?
I think its wise to use SaveOrUpdate when you are not sure that the record is in the DataBase or not.