One to One
Siminov Framework edited this page Aug 18, 2015
·
8 revisions
One-To-One relationship is in which each row in one database table is linked to 1 and 1 other row in another table.
Example: Relationship between Table A and Table B, each row in Table A is linked to another row in Table B. The number of rows in Table A must equal the number of rows in Table B.
<entity-descriptor>
<relationships>
<relationship>
<property name="type">one-to-one/false</property>
<property name="refer">name-of-variable</property>
<property name="refer_to">full-class-path-of-refer-variable</property>
<property name="on_update">cascade/restrict/no_action/set_null/set_default</property>
<property name="on_delete">cascade/restrict/no_action/set_null/set_default</property>
<property name="load">true/false</property>
</relationship>
</relationships>
</entity-descriptor>