Pergunta

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?

Foi útil?

Solução

this should work:

context.Categories.filter("it.id in ids", { ids: yourarraywithids} ).toArray()
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top