q = filter('city =','Seattle'或'Osaka')是否正确?

时间:2014-06-27 18:05:05

标签: google-app-engine google-cloud-datastore

我想找到所有来自西雅图或大阪的客户。这是对的吗?

q = Customer.all()
q = filter('city =', 'Seattle' or 'Osaka')

1 个答案:

答案 0 :(得分:1)

没有。你想要

q.filter('city IN', ['Seattle','Osaka'])