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

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [FilterBuilder](./repository.filterbuilder.md) &gt; [impose](./repository.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.

<b>Signature:</b>

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

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  constraint | [Filter](./repository.filter.md)<!-- -->&lt;MT&gt; \| [Where](./repository.where.md)<!-- -->&lt;MT&gt; | a constraint object to merge with own filter object |

<b>Returns:</b>

this


