Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BelongsToCreateAssociationMixin<TAttributes>

The createAssociation mixin applied to models with belongsTo. An example of usage is as follows:


User.belongsTo(Role);

interface UserInstance extends Sequelize.Instance<UserInstance, UserAttributes>, UserAttributes {
   // getRole...
   // setRole...
   createRole: Sequelize.BelongsToCreateAssociationMixin<RoleAttributes>;
}
see

http://docs.sequelizejs.com/en/latest/api/associations/belongs-to/

see

Instance

Type parameters

  • TAttributes

Hierarchy

  • BelongsToCreateAssociationMixin

Callable

  • Create a new instance of the associated model and associate it with this.

    
    User.belongsTo(Role);
    
    interface UserInstance extends Sequelize.Instance<UserInstance, UserAttributes>, UserAttributes {
       // getRole...
       // setRole...
       createRole: Sequelize.BelongsToCreateAssociationMixin<RoleAttributes>;
    }
    

    Parameters

    Returns Promise<void>

Generated using TypeDoc