On Fri, Feb 21, 2014 at 6:20 AM, Ben Liet <benl...@gmail.com> wrote:

> I have an object with a startdate and a enddate.
> Now I would like to select all objects where a parameter is between the
> start- and enddate.
> But the datastore supports only one inequality filter per query (excepted
> on one field). So how i could implement a query to get the objects i want?
>


As you noted, the datastore only supports one inequality filter. In
general, most people get around it by querying on one inequality,
collecting all the matching results, and filtering on the other inequality
within the application. Another way is to use IN queries: see this example
SO answer:
http://stackoverflow.com/questions/14939152/gae-datastore-filter-by-date-interval



-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to