---
lang: en
title: 'API docs: repository.referencesmany'
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.referencesmany.html
---

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [referencesMany](./repository.referencesmany.md)

## referencesMany() function

Decorator for referencesMany

<b>Signature:</b>

```typescript
export declare function referencesMany<T extends Entity>(targetResolver: EntityResolver<T>, definition?: Partial<ReferencesManyDefinition>, propertyDefinition?: Partial<PropertyDefinition>): (decoratedTarget: Entity, decoratedKey: string) => void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  targetResolver | [EntityResolver](./repository.entityresolver.md)<!-- -->&lt;T&gt; | A resolver function that returns the target model for a referencesMany relation |
|  definition | Partial&lt;[ReferencesManyDefinition](./repository.referencesmanydefinition.md)<!-- -->&gt; | <i>(Optional)</i> Optional metadata for setting up a referencesMany relation |
|  propertyDefinition | Partial&lt;[PropertyDefinition](./repository.propertydefinition.md)<!-- -->&gt; | <i>(Optional)</i> Optional metadata for setting up the property |

<b>Returns:</b>

(decoratedTarget: [Entity](./repository.entity.md)<!-- -->, decoratedKey: string) =&gt; void

A property decorator


