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

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [HasManyThroughRepository](./repository.hasmanythroughrepository.md) &gt; [create](./repository.hasmanythroughrepository.create.md)

## HasManyThroughRepository.create() method

Create a target model instance

<b>Signature:</b>

```typescript
create(targetModelData: DataObject<Target>, options?: Options & {
        throughData?: DataObject<Through>;
        throughOptions?: Options;
    } & {
        polymorphicType?: string;
    }): Promise<Target>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  targetModelData | [DataObject](./repository.dataobject.md)<!-- -->&lt;Target&gt; | The target model data |
|  options | [Options](./repository.options.md) &amp; { throughData?: [DataObject](./repository.dataobject.md)<!-- -->&lt;Through&gt;; throughOptions?: [Options](./repository.options.md)<!-- -->; } &amp; { polymorphicType?: string; } | <i>(Optional)</i> Options for the operation options.polymorphicType a string or a string array of polymorphic type names specify of which concrete model the created instance should be |

<b>Returns:</b>

Promise&lt;Target&gt;

A promise which resolves to the newly created target model instance


