Page Contents
Home > @loopback/repository > HasManyThroughRepository > delete
HasManyThroughRepository.delete() method
Delete multiple target model instances
Signature:
delete(where?: Where<Target>, options?: Options & {
throughOptions?: Options & {
discriminator?: string;
};
} & {
polymorphicType?: string | string[];
}): Promise<Count>;
Parameters
Parameter | Type | Description |
---|---|---|
where | Where<Target> | (Optional) Instances within the where scope are deleted |
options | Options & { throughOptions?: Options & { discriminator?: string; }; } & { polymorphicType?: string | string[]; } | (Optional) 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<Count>
A promise which resolves the deleted target model instances