Foreign key are essential for the compiler to understand your model’s relations.
<foreign-key foreignTable = "/TheOtherTableName/" [onDelete = "cascade|setnull|restrict|none"] [onUpdate = "cascade|setnull|restrict|none"] > <reference local="/LocalColumnName/" foreign="/ForeignColumnName/" /> </foreign-key>
foreignTable
The foreign table name to refer to.onDelete
SQL on delete.onUpdate
SQL on update.LocalColumnName
Column name of the local reference.ForeignColumnName
Column name of the foreign reference.