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

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [HasManyDefinition](./repository.hasmanydefinition.md) &gt; [through](./repository.hasmanydefinition.through.md)

## HasManyDefinition.through property

Description of the through model of the hasManyThrough relation.

A `hasManyThrough` relation defines a many-to-many connection with another model. This relation indicates that the declaring model can be matched with zero or more instances of another model by proceeding through a third model.

E.g a Category has many Products, and a Product can have many Categories. CategoryProductLink can be the through model. Such a through model has information of foreign keys of the source model(Category) and the target model(Product).

Warning: The hasManyThrough interface is experimental and is subject to change. If backwards-incompatible changes are made, a new major version may not be released.

<b>Signature:</b>

```typescript
through?: {
        model: TypeResolver<Entity, typeof Entity>;
        keyFrom?: string;
        keyTo?: string;
    };
```

