Type alias HasOneCreateAssociationMixin<Target, ExcludedAttributes>

HasOneCreateAssociationMixin<Target, ExcludedAttributes>: ((values?, options?) => Promise<Target>)

Type Parameters

Type declaration

    • (values?, options?): Promise<Target>
    • The createAssociation mixin applied to models with hasOne. An example of usage is as follows:

      class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {
      declare createRole: HasOneCreateAssociationMixin<Role>;
      }

      User.hasOne(Role);

      Parameters

      Returns Promise<Target>

      See

      Model.hasOne

Generated using TypeDoc