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

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [DefaultBelongsToRepository](./repository.defaultbelongstorepository.md) &gt; [(constructor)](./repository.defaultbelongstorepository.(constructor).md)

## DefaultBelongsToRepository.(constructor)

Constructor of DefaultBelongsToEntityCrudRepository

<b>Signature:</b>

```typescript
constructor(getTargetRepository: Getter<TargetRepository>, constraint: DataObject<TargetEntity>);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  getTargetRepository | <code>Getter&lt;TargetRepository&gt;</code> | the getter of the related target model repository instance |
|  constraint | <code>DataObject&lt;TargetEntity&gt;</code> | the key value pair representing foreign key name to constrain the target repository instance |


