Page Contents

Home > @loopback/repository > getModelRelations

getModelRelations() function

Get metadata of all relations defined on a given model class.

Signature:

export declare function getModelRelations(modelCtor: typeof Model): RelationDefinitionMap;

Parameters

Parameter Type Description
modelCtor typeof Model The model class (the constructor function).

Returns:

RelationDefinitionMap

A map of relation definitions