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!
query = query.filter("position", ceo);
All Objectify command objects are immutable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With