UNPKG

@loopback/docs

Version:
37 lines (25 loc) 1.89 kB
--- lang: en title: 'API docs: repository.hasmanythroughdefinition' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar editurl: https://github.com/strongloop/loopback-next/tree/master/packages/repository permalink: /doc/en/lb4/apidocs.repository.hasmanythroughdefinition.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [HasManyThroughDefinition](./repository.hasmanythroughdefinition.md) ## HasManyThroughDefinition interface 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. 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 export interface HasManyThroughDefinition extends RelationDefinitionBase ``` ## Properties | Property | Type | Description | | --- | --- | --- | | [keyFrom](./repository.hasmanythroughdefinition.keyfrom.md) | <code>string</code> | The foreign key in the source model, e.g. Customer\#id. | | [keyTo](./repository.hasmanythroughdefinition.keyto.md) | <code>string</code> | The primary key of the target model, e.g Seller\#id. | | [targetsMany](./repository.hasmanythroughdefinition.targetsmany.md) | <code>true</code> | | | [through](./repository.hasmanythroughdefinition.through.md) | <code>{</code><br/><code> model: TypeResolver&lt;Entity, typeof Entity&gt;;</code><br/><code> keyFrom: string;</code><br/><code> keyTo: string;</code><br/><code> }</code> | | | [type](./repository.hasmanythroughdefinition.type.md) | <code>RelationType.hasMany</code> | |