Type alias HasManyAddAssociationsMixin<T, TModelPrimaryKey>

HasManyAddAssociationsMixin<T, TModelPrimaryKey>: ((newAssociations?, options?) => Promise<void>)

Type Parameters

  • T extends Model

  • TModelPrimaryKey

Type declaration

    • (newAssociations?, options?): Promise<void>
    • The addAssociations mixin applied to models with hasMany. An example of usage is as follows:

      class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {
      declare addRoles: HasManyAddAssociationsMixin<Role, Role['id']>;
      }

      User.hasMany(Role);

      Parameters

      Returns Promise<void>

      See

      Model.hasMany

Generated using TypeDoc