>> 2. Is it possible to pass some thing like 'or' to filter ?
>> Some thing like this:
>> articles = Article.all().filter('author =',
>> user.get_current_user()).or('user =', user.get_current_user())
>
> No, the datastore doesn't support OR queries. You'll need to execute
> multiple queries and join the results yourself.
Ok, Thanks.
I just find one way to 'join' the results:
entries = list(chain(Article.all().filter('public =',
False).filter('status =', True).filter('author =', user),
Article.all().filter('public =', True)))
trying:
entries = Article.all().filter('public =', False).filter('status =',
True).filter('author =', user)
entries += Article.all().filter('public =', True)
don't work.
There is a better way to join the results ?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.