---
url: /nestjs-odata/api/generated/functions/ODataPut.md
---
# Function: ODataPut()

> **ODataPut**(`entitySetName`, `options?`): `MethodDecorator`

Defined in: [decorators/odata-put.decorator.ts:24](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/decorators/odata-put.decorator.ts#L24)

Composite method decorator for OData PUT (full entity replacement) endpoints.

Composes:

1. Put(path) — NestJS route decorator, defaults to ':key'
2. SetMetadata(ODATA_ROUTE_KEY, { entitySetName, operation: 'replace', isSingleEntity: true })
3. UseInterceptors(ODataResponseInterceptor) — wraps result in single-entity OData envelope
4. UseFilters(ODataExceptionFilter) — formats errors as OData v4 error bodies

Per D-01: PUT semantics — full entity replacement. All unspecified fields reset to
column defaults (null for nullable, default value for columns with defaults).
Per D-02: parenthetical key via ':key' param.
Zero TypeORM imports — per PKG-01 architecture constraint.

## Parameters

### entitySetName

`string`

### options?

[`ODataPutOptions`](../interfaces/ODataPutOptions.md)

## Returns

`MethodDecorator`
