Page Contents

Home > @loopback/repository > DefaultCrudRepository > includeRelatedModels

DefaultCrudRepository.includeRelatedModels() method

Returns model instances that include related models of this repository that have a registered resolver.

Signature:

protected includeRelatedModels(entities: T[], include?: Inclusion<T>[], options?: Options): Promise<(T & Relations)[]>;

Parameters

Parameter Type Description
entities T[] An array of entity instances or data
include Inclusion<T>[] Inclusion filter
options Options Options for the operations

Returns:

Promise<(T & Relations)[]>