@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
39 lines (27 loc) • 1.95 kB
Markdown
lang: en
title: 'API docs: repository.hasmanythroughrepository'
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.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [HasManyThroughRepository](./repository.hasmanythroughrepository.md)
## HasManyThroughRepository interface
CRUD operations for a target repository of a HasManyThrough relation
EXPERIMENTAL: This interface is not stable and may change in the near future. Backwards-incompatible changes may be introduced in semver-minor versions.
<b>Signature:</b>
```typescript
export interface HasManyThroughRepository<Target extends Entity, TargetID, Through extends Entity>
```
## Methods
| Method | Description |
| --- | --- |
| [create(targetModelData, options)](./repository.hasmanythroughrepository.create.md) | Create a target model instance |
| [delete(where, options)](./repository.hasmanythroughrepository.delete.md) | Delete multiple target model instances |
| [find(filter, options)](./repository.hasmanythroughrepository.find.md) | Find target model instance(s) |
| [link(targetModelId, options)](./repository.hasmanythroughrepository.link.md) | Creates a new many-to-many association to an existing target model instance |
| [patch(dataObject, where, options)](./repository.hasmanythroughrepository.patch.md) | Patch multiple target model instances |
| [unlink(targetModelId, options)](./repository.hasmanythroughrepository.unlink.md) | Removes an association to an existing target model instance |
| [unlinkAll(options)](./repository.hasmanythroughrepository.unlinkall.md) | Remove all association to an existing target model instance |