Page Contents

Home > @loopback/repository > createHasManyInclusionResolver

createHasManyInclusionResolver() function

Creates InclusionResolver for HasMany relation. Notice that this function only generates the inclusionResolver. It doesn’t register it for the source repository.

Notice: scope field for inclusion is not supported yet.


export declare function createHasManyInclusionResolver<Target extends Entity, TargetID, TargetRelations extends object>(meta: HasManyDefinition, getTargetRepo: Getter<EntityCrudRepository<Target, TargetID, TargetRelations>>): InclusionResolver<Entity, Target>;


Parameter Type Description
meta HasManyDefinition resolved metadata of the hasMany relation
getTargetRepo Getter<EntityCrudRepository<Target, TargetID, TargetRelations>> target repository i.e where related instances are


InclusionResolver<Entity, Target>