Chain several 'where' clauses with AND into a single predicate
Closed this issue · 0 comments
buchatsky commented
Steps to reproduce
const query = service.companies()
.where(c => c.id >= 27)
.where(c => c.id < 35)
results in $filter=id lt 27
Expected behavior
Chain several ODataQuery 'where' clauses with AND into a single predicate
$filter=id ge 27 and id lt 35
Actual behavior
Only the last 'where' clause takes effect
$filter=id lt 35
Use case: filtering data grid by several columns simultaneously, e.g.
const query = service.companies()
.where("id >= 27")
.where("name.startsWith('Net')");