Hi,
I want to add a question. Can I do something like that:
filtro = PRINC.all()
filtro.filter('code= ', self.request.get('var'))
and if I can't how can I do it? *
var *is the input of a text box.
Massimiliano
2010/7/26 Geoffrey Spear <[email protected]>
>
>
> On Jul 25, 8:31 pm, Felippe Bueno <[email protected]> wrote:
> > Hello people.
> >
> > 3 questions:
> > 1. is it possible to filter an property inside the Entity property?
> > For example:
> > Article(author = users.get_current_user(), skey='monmon').save()
> > Invite(author = users.get_current_user(), entry =
> Article.get('monmon')).save()
> >
> > ##here is the filter
> > invites = Invite.all().filter('entry.author =', user.get_current_user())
>
> No, you can only filter on actual indexed properties. To get this
> functionality, you'll need to denormalize and store entry's author
> property as a property in the Invite entity at write-time. Note that
> for this to work you'll also need to arrange for this property to be
> updated when you change the corresponding Article entity.
>
> >
> > 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.
>
> --
> 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]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
--
My email: [email protected]
My Google Wave: [email protected]
--
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.