Type alias HasManyHasAssociationsMixin<TModel, TModelPrimaryKey>

HasManyHasAssociationsMixin<TModel, TModelPrimaryKey>: ((targets: (TModel | TModelPrimaryKey)[], options?: HasManyHasAssociationsMixinOptions<TModel>) => Promise<boolean>)

Type Parameters

  • TModel extends Model

  • TModelPrimaryKey

Type declaration

    • (targets: (TModel | TModelPrimaryKey)[], options?: HasManyHasAssociationsMixinOptions<TModel>): Promise<boolean>
    • The removeAssociations mixin applied to models with hasMany. An example of usage is as follows:

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

      User.hasMany(Role);

      See

      Model.hasMany

      Parameters

      Returns Promise<boolean>

Generated using TypeDoc