Type alias BelongsToManyRemoveAssociationsMixin<TModel, TModelPrimaryKey>

BelongsToManyRemoveAssociationsMixin<TModel, TModelPrimaryKey>: ((associationsToRemove?, options?) => Promise<void>)

The removeAssociations mixin applied to models with belongsToMany. An example of usage is as follows:

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

User.belongsToMany(Role, { through: UserRole });

Type Parameters

  • TModel
  • TModelPrimaryKey

Type declaration

See

Model.belongsToMany