Documentation
    Preparing search index...

    Class HasManyAssociation<S, T, SourceKey, TargetKey, TargetPrimaryKey>

    One-to-many association. See Model.hasMany

    Like with HasOneAssociation, the foreign key will be defined on the target model.

    In the API reference below, add the name of the association to the method, e.g. for User.hasMany(Project) the getter will be user.getProjects(). If the association is aliased, use the alias instead, e.g. User.hasMany(Project, { as: 'jobs' }) will be user.getJobs().

    Type Parameters

    Index
    isAliased: boolean
    isSelfAssociation: boolean
    parentAssociation:
        | Association<
            Model<any, any>,
            Model<any, any>,
            string,
            NormalizedAssociationOptions<string>,
        >
        | null

    A reference to the association that created this one.

    source: ModelStatic<S>
    target: ModelStatic<T>