Hi
I am trying to execute a query in the data store, the query would be
something like this:

"select listingNumber from {class name here} where listPrice>=10000 &&
listPrice<=200000 && listingStatusId IN (1) && houseTypeId IN
(1,2,4,6) &&  zipCode IN ('33035')"

I know the In syntax is not standard, but I got the impression from
some issue that I can no longer find that it could work

I also tried using contains, with parameters and executeWithMap,
declaring the parameters, and not, nothing seems to work, I can make
simpler queries, by Id, by a field, delete all entities, all works
fine, except this.

Somebody has a complex query sample in java, query on one class only
is fine, but would like something with >= and more than one contains?,
my code would translate to something like:

Query query = pm.newQuery("select listingNumber from {class name here}
");
                query.setFilter("listPrice>=:minPrice && listPrice<=:maxPrice
&& :status.contains(listingStatusId)
&& :houseType.contains(houseTypeId) &&  :zip.contains(zipCode)");
                //query.declareParameters("pars defined here");
                Map<String,Object> pars= new HashMap<String, Object>();
                pars.put("minPrice", minPrice);
                pars.put("maxPrice", maxPrice);
                pars.put("status", Arrays.asList(status));
                pars.put("houseType", Arrays.asList(houseType));
                pars.put("zip", Arrays.asList(zipCode));
                results= (List<String>) query.executeWithMap(pars);

thanks
Karel

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to