---
lang: en
title: 'API docs: repository.hasmanythroughrepository.unlink'
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.hasmanythroughrepository.unlink.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [HasManyThroughRepository](./repository.hasmanythroughrepository.md) &gt; [unlink](./repository.hasmanythroughrepository.unlink.md)

## HasManyThroughRepository.unlink() method

Removes an association to an existing target model instance

**Signature:**

```typescript
unlink(targetModelId: TargetID, options?: Options & {
        throughOptions?: Options;
    }): Promise<void>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  targetModelId | TargetID | The target model to unlink |
|  options | [Options](./repository.options.md) &amp; { throughOptions?: [Options](./repository.options.md)<!-- -->; } | _(Optional)_ |

**Returns:**

Promise&lt;void&gt;

A promise which resolves to null


