Katedral Pillon Katedral Pillon - 27 days ago 9
Java Question

Objectify Projection Query with Filters

Given the class

public class Goat{
Long pen;
Long car;
Boolean active;


I need to create a projection query that returns a list of
s. How should I edit the following so it works?

List<Long> cars = ofy().load().type(Goat.class).filter("pen", pen).filter("active", true).project("car").list();


You need to index all fields you plan to query/filter on. eg.

 Long pen;
 Long car;