Page Contents

Home > @loopback/repository > HasManyThroughRepository > find

HasManyThroughRepository.find() method

Find target model instance(s)

Signature:

find(filter?: Filter<Target>, options?: Options & {
        throughOptions?: Options & {
            discriminator?: string;
        };
    } & {
        polymorphicType?: string | string[];
    }): Promise<Target[]>;

Parameters

Parameter Type Description
filter Filter<Target> (Optional) A filter object for where, order, limit, etc.
options Options & { throughOptions?: Options & { discriminator?: string; }; } & { polymorphicType?: string | string[]; } (Optional) Options for the operation options.throughOptions.discriminator - target discriminator field on through options.polymorphicType a string or a string array of polymorphic type names to specify which repositories should are expected to be searched It is highly recommended to contain this param especially for datasources using deplicated ids across tables

Returns:

Promise<Target[]>

A promise which resolves with the found target instance(s)