---
lang: en
title: 'API docs: repository.repositorymetadata._constructor_'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/repository
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 | string \| typeof [Entity](./repository.entity.md) | 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 | string \| juggler.DataSource \| [DataSource](./repository.datasource.md) | 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); |


