@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 1.07 kB
Markdown
---
lang: en
title: 'API docs: repository.filterbuilder.impose'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.filterbuilder.impose.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [FilterBuilder](./repository.filterbuilder.md) > [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 | <code>Filter<MT> | Where<MT></code> | a constraint object to merge with own filter object |
<b>Returns:</b>
`this`