Page Contents

Home > @loopback/repository > DefaultBelongsToRepository > (constructor)

DefaultBelongsToRepository.constructor

Constructor of DefaultBelongsToEntityCrudRepository

Signature:

constructor(getTargetRepository: Getter<TargetRepository>, constraint: DataObject<TargetEntity>);

Parameters

Parameter Type Description
getTargetRepository Getter<TargetRepository> the getter of the related target model repository instance
constraint DataObject<TargetEntity> the key value pair representing foreign key name to constrain the target repository instance