Type alias HasManyRemoveAssociationsMixin<T, TModelPrimaryKey>

HasManyRemoveAssociationsMixin<T, TModelPrimaryKey>: ((oldAssociateds?: (T | TModelPrimaryKey)[], options?: HasManyRemoveAssociationsMixinOptions<T>) => Promise<void>)

Type Parameters

  • T extends Model

  • TModelPrimaryKey

Type declaration

    • (oldAssociateds?: (T | TModelPrimaryKey)[], options?: HasManyRemoveAssociationsMixinOptions<T>): Promise<void>
    • The removeAssociations mixin applied to models with hasMany. An example of usage is as follows:

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

      User.hasMany(Role);

      See

      Model.hasMany

      Parameters

      Returns Promise<void>

Generated using TypeDoc