You can follow this link for one-to-one mapping in Hibernate. So you hbm files may be as follows:
<hibernate-mapping>
<class name="...Invoice" table="invoices">
<id name="invoiceId" column="INVOICE_ID"/>
...
<many-to-one name="hotsheet" class="package.Hotsheet" column="INVOICE_HOTSHEET" not-null="true" cascade="all" unique="true" />
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="package.Hotsheet" table="hotsheets">
<id name="hotsheetId" column="HOTSHEET_ID"/>
...
<one-to-one name="invoice"
property-ref="hotsheet"/>
</class>
</hibernate-mapping>
Note that to create the one-to-one relationship we use the many-to-one with constraint unique set to true for the column INVOICE_HOTSHEET
.
BR.