Objectify Filter by Ref
google-app-engine, objectify
Solution
query = query.filter("position", ceo);
All Objectify command objects are immutable.
Problem
I have a m-n relationship with Objectify, and I want to get 1 side of the relation. I was trying to solve it with this query: ``` Query query = ofy().load().type(Person.class); query.filter("position", ceo); return query.list(); ``` To return a list of CEOs. Position is a Ref< Position>. I have tried: ``` query.filter("position", Ref.create(ceo)); query.filter("position", Key.create(ceo)); query.filter("position", ceo.key); ``` But nothing, does anyone knows how to do this? EDIT: It was an Index problem. Sorry!