you can do
q = Orders.query(Orders.country == ndb.Key('Countries', 'US'),
                          Orders.clients == 'client_id_etc')

but you can't query for non-existent things

you may add a seperate no_clients BooleanProperty etc and set it to True

so the answer to your question is, you can treat repeated properties as 
regular properties inside queries

if you read the docs, they explain these pretty well



On Monday, November 26, 2012 11:08:06 AM UTC+2, Moises Belchin wrote:
>
> Hi guys,
>
> I want to query by a repeated property, Is there any way to build this 
> kind of queries ??
>
> ie:
>
> class Orders(ndb.Model):
>   clients = ndb.KeyProperty(indexed=True, default=None, repeated=True)
>
> q = Orders.query(Orders.country == ndb.Key('Countries', 'US'),
>                           Orders.clients == [])
>
> Regards.
> Moisés Belchín.
>
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/pRXDQTjOxqgJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to