Question

I'm building a SPA that communicates with a tomcat server that exposes REST services using the Odata protocol. The queries are created using the Jaydata framework.

I need to make a query like this:

SELECT * from category where category.id in (1223,1001....)

currently I build it with OR:

  $filter=(((((((category/id eq 1062) or (category/id eq 1061)) or (category/id eq 1063)) ...

Is there a way to change it to where...in query instead of OR?

Was it helpful?

Solution

this should work:

context.Categories.filter("it.id in ids", { ids: yourarraywithids} ).toArray()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top