gkatzioura gkatzioura - 4 months ago 40
Java Question

Google app engine OR QUERY ids with Objectify

Hello I am using objectify with google app engine.
I've seen that I can do something like this one

List<Car> cars = ofy().load().type(Car.class).filter("year in", yearList).list();

Which achieves an OR QUERY result
However when I try to query by id (set as a Long type),
I get an exception and that only filtering by Long or String values is allowed.
More specific

java.lang.IllegalArgumentException: Id filter values must be Long or String

Is it possible to make an OR QUERY by id filtering?


When querying multiple ids use ..


... where IDs is a List of your ids.