---
lang: en
title: 'API docs: repository.relationdefinitionbase'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.relationdefinitionbase.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [RelationDefinitionBase](./repository.relationdefinitionbase.md)

## RelationDefinitionBase interface

**Signature:**

```typescript
export interface RelationDefinitionBase 
```

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [name](./repository.relationdefinitionbase.name.md) |  | string | 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) |  | typeof [Entity](./repository.entity.md) | <p>The source model of this relation.</p><p>E.g. when a Customer has many Order instances, then Customer is the source.</p> |
|  [target](./repository.relationdefinitionbase.target.md) |  | [TypeResolver](./repository.typeresolver.md)<!-- -->&lt;[Entity](./repository.entity.md)<!-- -->, typeof [Entity](./repository.entity.md)<!-- -->&gt; | <p>The target model of this relation.</p><p>E.g. when a Customer has many Order instances, then Order is the target.</p> |
|  [targetsMany](./repository.relationdefinitionbase.targetsmany.md) |  | boolean | True for relations targeting multiple instances (e.g. HasMany), false for relations with a single target (e.g. BelongsTo, HasOne). This property is needed by OpenAPI/JSON Schema generator. |
|  [type](./repository.relationdefinitionbase.type.md) |  | [RelationType](./repository.relationtype.md) | The type of the relation, must be one of RelationType values. |


