@loopback/docs
Version:
Documentation for LoopBack 4
31 lines (21 loc) • 1.44 kB
Markdown
---
lang: en
title: 'API docs: repository.relationdefinitionbase'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.relationdefinitionbase.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [RelationDefinitionBase](./repository.relationdefinitionbase.md)
## RelationDefinitionBase interface
<b>Signature:</b>
```typescript
export interface RelationDefinitionBase
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [name](./repository.relationdefinitionbase.name.md) | <code>string</code> | The relation name, typically matching the name of the accessor property defined on the source model. For example "orders" or "customer". |
| [source](./repository.relationdefinitionbase.source.md) | <code>typeof Entity</code> | The source model of this relation.<!-- -->E.g. when a Customer has many Order instances, then Customer is the source. |
| [target](./repository.relationdefinitionbase.target.md) | <code>TypeResolver<Entity, typeof Entity></code> | The target model of this relation.<!-- -->E.g. when a Customer has many Order instances, then Order is the target. |
| [type](./repository.relationdefinitionbase.type.md) | <code>RelationType</code> | The type of the relation, must be one of RelationType values. |