---
lang: en
title: 'API docs: repository.getmodelrelations'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.getmodelrelations.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [getModelRelations](./repository.getmodelrelations.md)

## getModelRelations() function

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

<b>Signature:</b>

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

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  modelCtor | <code>typeof Model</code> | The model class (the constructor function). |

<b>Returns:</b>

`RelationDefinitionMap`

A map of relation definitions


