UNPKG

@loopback/docs

Version:
29 lines (19 loc) 1.04 kB
--- lang: en title: 'API docs: repository.hasmanydefinition' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.repository.hasmanydefinition.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) ## HasManyDefinition interface <b>Signature:</b> ```typescript export interface HasManyDefinition extends RelationDefinitionBase ``` ## Properties | Property | Type | Description | | --- | --- | --- | | [keyTo](./repository.hasmanydefinition.keyto.md) | <code>string</code> | The foreign key used by the target model.<!-- -->E.g. when a Customer has many Order instances, then keyTo is "customerId". Note that "customerId" is the default FK assumed by the framework, users can provide a custom FK name by setting "keyTo". | | [type](./repository.hasmanydefinition.type.md) | <code>RelationType.hasMany</code> | |