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

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [rejectNavigationalPropertiesInData](./repository.rejectnavigationalpropertiesindata.md)

## rejectNavigationalPropertiesInData() function

Check model data for navigational properties linking to related models. Throw a descriptive error if any such property is found.

**Signature:**

```typescript
export declare function rejectNavigationalPropertiesInData<M extends typeof Entity>(modelClass: M, data: DataObject<PrototypeOf<M>>): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  modelClass | M | Model constructor, e.g. <code>Product</code>. |
|  data | [DataObject](./repository.dataobject.md)<!-- -->&lt;[PrototypeOf](./repository.prototypeof.md)<!-- -->&lt;M&gt;&gt; |  |

**Returns:**

void


