Making 'OR' Queries in Google App Engine Data Model

丶灬走出姿态 提交于 2019-12-05 00:56:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!