Optional
asThe alias of this model, in singular form. See also the name
option passed to sequelize.define
. If
you create multiple associations between the same tables, you should provide an alias to be able to
distinguish between them. If you provide an alias when creating the association, you should provide the
same alias when eager loading and when getting associated models. Defaults to the singularized name of
target
Optional
foreignThe configuration of the foreign key Attribute. See define or init for more information about the syntax.
Using a string is equivalent to passing a ForeignKeyOptions object with the name option set.
Optional
foreignShould ON UPDATE, ON DELETE, and REFERENCES constraints be enabled on the foreign key.
Optional
hooksIf false
the applicable hooks will not be called.
The default value depends on the context.
true
Optional
inverseOptional
as?: string | { Optional
scope?: AssociationScopeOptional
scopeOptional
sourceThe name of the field to use as the key for the association in the source table. Defaults to the primary key of the source table.
This is the attribute the foreign key will target. Not to be confused with foreignKey.
Generated using TypeDoc
Options provided when associating models with hasOne relationship