So I am trying to do 2 sequential queries in app-engine to get around
the problem of only being able to primary sort on the property that an
inequality is done on. The problem is that setCandidates(Collection)
doesnt actually appear to set the candidates to query against. Pseudo-
code below.
Query ageQuery = persistenceManager.newQuery(PersistentObject.class);
ageQuery.setFilter("age < ageMax");
ageQuery.declareParameters("Integer ageMax");
QueryResult unsorted = ageQuery.execute(25);
Query sortQuery = persistenceManager.newQuery(PersistentObject.class);
sortQuery.setOrdering("dateCreated desc");
sortQuery.setCandidates(unsorted);
QueryResult sorted = sortQuery.execute();
Also, one can verify that setCandidates doesn't work with something
like below
Query query= persistenceManager.newQuery(PersistentObject.class);
query.setCandidates(new ArrayList());
QueryResult sorted = qujery.execute();
because sorted.size()!=0. Has anyone else ran into this problem? Am
i doing something wrong?
Thanks in advance for the help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---