Katedral Pillon Katedral Pillon - 1 year ago 124
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();

Answer Source

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

 Long pen;
 Long car;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download