Can I make a query that only includes objects that don't have a parti开发者_C百科cular element empty in Google App Engine database?
Thanks!
non_empty_profile= Profile.all().filter('user !=',None)
It's only possible to filter for property values on entities where that property exists. So if you want entities where name
has any value, including None
, you can do this:
query.filter('name >=' None)
If you want to fetch all values except None
, do this:
query.filter('name >' None)
To fetch all values except an empty string:
query.filter('name !=', '')
精彩评论