First of all, thanks for your answer. In NDB you can query for non-existing things, ie: Orders.query(Orders.pending == None).fetch()
Just as you can query for None, I would ask for empty list. I know you can create a ComputedProperty and query by this new property but I don't want to do this when the information, that I'm querying, is in my Repeated property. My question is if there is any way to query by empty list. Thanks again for comments. Regards. Saludos. Moisés Belchín. 2012/11/27 Kaan Soral <[email protected]> > 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 [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. > -- 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.
