Page Contents

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

DefaultHasOneRepository.constructor

Constructor of DefaultHasOneEntityCrudRepository

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