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

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

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

## RepositoryMetadata.(constructor)

Constructor for RepositoryMetadata

<b>Signature:</b>

```typescript
constructor(modelOrRepo: string | typeof Entity, dataSource?: string | juggler.DataSource | DataSource);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  modelOrRepo | <code>string &#124; typeof Entity</code> | Name or class of the model. If the value is a string and <code>dataSource</code> is not present, it will treated as the name of a predefined repository |
|  dataSource | <code>string &#124; juggler.DataSource &#124; DataSource</code> | Name or instance of the data source<!-- -->For example:<!-- -->- new RepositoryMetadata(repoName); - new RepositoryMetadata(modelName, dataSourceName); - new RepositoryMetadata(modelClass, dataSourceInstance); - new RepositoryMetadata(modelName, dataSourceInstance); - new RepositoryMetadata(modelClass, dataSourceName); |


