问题
I want to make a query like this "Select name from Person where Address="" OR age="" ". Is that possible in the GAE model. All things include AND closure and not OR. How can i do that with JDO/JPA, Objectify. Thanks in advance
回答1:
There is no "OR" operation on the datastore. You must do two separate queries and find the intersection in your own code.
http://code.google.com/appengine/docs/python/datastore/gqlreference.html
回答2:
I recommend Anyone who is having difficulties with GAE datastore model to have a look at this video. It explains how it works, then you will understand why the limitations exists
http://sites.google.com/site/io/under-the-covers-of-the-google-app-engine-datastore
来源:https://stackoverflow.com/questions/5393571/making-or-queries-in-google-app-engine-data-model