[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/orm](../../README) / [index](../README) / allowNPlusOne

# Function: allowNPlusOne()

> **allowNPlusOne**(`pattern`, `options?`, `ctx?`): `void`

Defined in: [packages/orm/src/db/NPlusOneDetector.ts:105](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/orm/src/db/NPlusOneDetector.ts#L105)

Suppress N+1 warnings for queries involving `pattern` (matched as a
case-insensitive substring of the SQL shape).

## Parameters

### pattern

`string`

A table name or any substring of the SQL fingerprint.

### options?

`{ once: true }` — suppress only for the current request.

#### once?

`boolean`

### ctx?

`object` \| `null`

## Returns

`void`

## Example

```ts
DB.allowNPlusOne('activity_logs');              // permanent
DB.allowNPlusOne('taggings', { once: true });   // this request only
```
