Back | Index
class parsetool.schema.ForeignKey
var _resolved(default,null) : Bool
var classField : Field
To get the Table object this ForeignKey is part of, use classField.parent
var columns : List<Field>
A list of the Field objects that are part of this key. ( fields in the foreignTable can be resolved by doing: columnsfield.rootField() )
var foreignClass : Table
Class referencing the fields decribed in this key.
var foreignFields : List<Field>
var onDelete : KeyAction
var onUpdate : KeyAction
var primaryKey : Bool
var selectAlias : String
Since it's possible to reference the same table twice or more, every foreignkey gets an extra alias for SELECT statements.
function new(primaryKey : Bool, classfield : Field, foreignClass : Table) : Void
function resolveColumns() : Void
This function will make a copy of all primary key columns and automagically rename them. It will append the Fields to the corresponding List in the Table object (this.classField.parent.primary / this.classField.parent.fields)
function toString() : String
Back | Index