Page Contents

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

DefaultHasManyThroughRepository.(constructor)

Constructs a new instance of the DefaultHasManyThroughRepository class

Signature:

constructor(getTargetRepository: Getter<TargetRepository> | {
        [repoType: string]: Getter<TargetRepository>;
    }, getThroughRepository: Getter<ThroughRepository>, getTargetConstraintFromThroughModels: (throughInstances: ThroughEntity[]) => DataObject<TargetEntity>, getTargetKeys: (throughInstances: ThroughEntity[]) => TargetID[], getThroughConstraintFromSource: () => DataObject<ThroughEntity>, getTargetIds: (targetInstances: TargetEntity[]) => TargetID[], getThroughConstraintFromTarget: (targetID: TargetID[]) => DataObject<ThroughEntity>, targetResolver: TypeResolver<Entity, typeof Entity>, throughResolver: TypeResolver<Entity, typeof Entity>);

Parameters

Parameter Type Description
getTargetRepository Getter<TargetRepository> | { [repoType: string]: Getter<TargetRepository>; }  
getThroughRepository Getter<ThroughRepository>  
getTargetConstraintFromThroughModels (throughInstances: ThroughEntity[]) => DataObject<TargetEntity>  
getTargetKeys (throughInstances: ThroughEntity[]) => TargetID[]  
getThroughConstraintFromSource () => DataObject<ThroughEntity>  
getTargetIds (targetInstances: TargetEntity[]) => TargetID[]  
getThroughConstraintFromTarget (targetID: TargetID[]) => DataObject<ThroughEntity>  
targetResolver TypeResolver<Entity, typeof Entity>  
throughResolver TypeResolver<Entity, typeof Entity>