Type alias HasManyRemoveAssociationMixin<T, TModelPrimaryKey>

HasManyRemoveAssociationMixin<T, TModelPrimaryKey>: ((oldAssociated?: T | TModelPrimaryKey, options?: HasManyRemoveAssociationMixinOptions<T>) => Promise<void>)

Type Parameters

  • T extends Model

  • TModelPrimaryKey

Type declaration

    • (oldAssociated?: T | TModelPrimaryKey, options?: HasManyRemoveAssociationMixinOptions<T>): Promise<void>
    • The removeAssociation mixin applied to models with hasMany. An example of usage is as follows:

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

      User.hasMany(Role);

      See

      Model.hasMany

      Parameters

      Returns Promise<void>

Generated using TypeDoc