문제

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?

도움이 되었습니까?

해결책

this should work:

context.Categories.filter("it.id in ids", { ids: yourarraywithids} ).toArray()
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top