I am using Google Datastore for an Android application, the backend is written in Java. In one table, I want to set multiple values to the same property:
Entity newGroup = new Entity("group");
newGroup.setProperty("member", "A");
newGroup.setProperty("member", "B");
newGroup.setProperty("member", "C");
datastore.put(newGroup);
I then want to query to find all groups a user belongs to, I do the following:
Query.Filter filter = new Query.FilterPredicate("member", Query.FilterOperator.EQUAL, "A");
Query q = new Query("group").setFilter(filter);
PreparedQuery pq = datastore.prepare(q);
However, the query does not generate any result. In the documentation it is mentioned that if at least one value of the property matches the filter, the entity is returned, which confuses me.
Thank you!
It should be: