---
lang: en
title: 'API docs: repository.defaulthasmanythroughrepository.delete'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.defaulthasmanythroughrepository.delete.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [DefaultHasManyThroughRepository](./repository.defaulthasmanythroughrepository.md) &gt; [delete](./repository.defaulthasmanythroughrepository.delete.md)

## DefaultHasManyThroughRepository.delete() method

**Signature:**

```typescript
delete(where?: Where<TargetEntity>, options?: Options & {
        throughOptions?: Options & {
            discriminator?: string;
        };
    } & {
        polymorphicType?: string | string[];
    }): Promise<Count>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  where | [Where](./filter.where.md)<!-- -->&lt;TargetEntity&gt; | _(Optional)_ |
|  options | [Options](./repository.options.md) &amp; { throughOptions?: [Options](./repository.options.md) &amp; { discriminator?: string; }; } &amp; { polymorphicType?: string \| string\[\]; } | _(Optional)_ |

**Returns:**

Promise&lt;[Count](./repository.count.md)<!-- -->&gt;


