You can only have one inequality filter per query. So you can say: where A==b && B==c && D==e && e>0
that last "e>0" is your ownly allowed inequality filter. It's in the docs :) On Feb 22, 1:39 am, ka2 <[email protected]> wrote: > 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 [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.
