gkatzioura gkatzioura - 1 year ago 115
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?

Answer Source

When querying multiple ids use ..


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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download