Page Contents

Home > @loopback/repository > HasManyDefinition

HasManyDefinition interface

Signature:

export interface HasManyDefinition extends RelationDefinitionBase 

Properties

Property Type Description
keyTo string 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”.
targetsMany true  
type RelationType.hasMany