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

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [ModelDefinition](./repository.modeldefinition.md) &gt; [idProperties](./repository.modeldefinition.idproperties.md)

## ModelDefinition.idProperties() method

Get an array of names of ID properties, which are specified in the model settings or properties with `id` attribute.

<b>Signature:</b>

```typescript
idProperties(): string[];
```
<b>Returns:</b>

string\[\]

## Example


```ts
{
  settings: {
    id: ['id']
  }
  properties: {
    id: {
      type: 'string',
      id: true
    }
  }
}
```


