1. Home
  2. Docs
  3. Compiler
  4. Schema (XML)
  5. Foreign-key element

Foreign-key element

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.

How can we help?

Leave a Reply