I have this Entity in which I need to query for:
@Entity
public class Resource implements Serializable {
@Id
private Long id;
private List<String> key;
}
Here is the query:
List<String> keyPath = key.getFullPath();
Resource result = ofy().load().type(Resource.class).filter("key =", keyPath).first().get();
I’m getting this error:
java.lang.IllegalArgumentException: A collection of values is not allowed.
at com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:140)
at com.google.appengine.api.datastore.Query$FilterPredicate.<init>(Query.java:867)
Question:
- Is is possible to do a query using collections like List as query value?
- Is it possible with Objectify query or native Datastore query?
- If not, what is the approach to doing this kind of query
The idea is to query get the Resource entity having the same list of strings (key field) as with the query value.
Have you tried with the
INoperator?