Options
All
  • Public
  • Public/Protected
  • All
Menu

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


User.belongsTo(Role);

interface UserInstance extends Sequelize.Instance<UserInstance, UserAttrib>, UserAttrib {
   getRole: Sequelize.BelongsToGetAssociationMixin<RoleInstance>;
   // setRole...
   // createRole...
}
see

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

see

Instance

Type parameters

  • TInstance

Hierarchy

  • BelongsToGetAssociationMixin

Callable

  • Get the associated instance.

    
    User.belongsTo(Role);
    
    interface UserInstance extends Sequelize.Instance<UserInstance, UserAttrib>, UserAttrib {
       getRole: Sequelize.BelongsToGetAssociationMixin<RoleInstance>;
       // setRole...
       // createRole...
    }
    

    Parameters

    Returns Promise<TInstance>

Generated using TypeDoc