1
votes

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?

1

1 Answers

1
votes

When querying multiple ids use ..

ofy().load().type(Car.class).ids(IDs);

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