---
lang: en
title: 'API docs: repository.hasonerepository.create'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.hasonerepository.create.html
---

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

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

## HasOneRepository.create() method

Create a target model instance

<b>Signature:</b>

```typescript
create(targetModelData: DataObject<Target>, options?: Options): Promise<Target>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  targetModelData | <code>DataObject&lt;Target&gt;</code> | The target model data |
|  options | <code>Options</code> | Options for the operation |

<b>Returns:</b>

`Promise<Target>`

A promise which resolves to the newly created target model instance


