---
lang: en
title: 'API docs: filter.filterbuilder.impose'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/filter
permalink: /doc/en/lb4/apidocs.filter.filterbuilder.impose.html
---

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

[Home](./index.md) &gt; [@loopback/filter](./filter.md) &gt; [FilterBuilder](./filter.filterbuilder.md) &gt; [impose](./filter.filterbuilder.impose.md)

## FilterBuilder.impose() method

Add a Filter or Where constraint object. If it is a filter object, create an `and` clause for conflicting keys with its where object. For any other properties, throw an error. If it's not a Filter, coerce it to a filter, and carry out the same logic.

**Signature:**

```typescript
impose(constraint: Filter<MT> | Where<MT>): this;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

constraint


</td><td>

[Filter](./filter.filter.md)<!-- -->&lt;MT&gt; \| [Where](./filter.where.md)<!-- -->&lt;MT&gt;


</td><td>

a constraint object to merge with own filter object


</td></tr>
</tbody></table>
**Returns:**

this


