some_blog = ... for index in BlogIndex.all().ancestor(some_blog): # do stuff with index
The argument to ancestor() can also be the key to the blog. - alkis On Wed, Sep 1, 2010 at 7:44 PM, johnterran <[email protected]> wrote: > Hi, > > If I have the parent entity, how do get all the child entities? > > i.e. > Blog is a parent of BlogIndex > > class Blog(db.Model): > pagename= db.StringProperty(required=True) > > class BlogIndex(db.Model): > usernames = db.StringListProperty(required=True) > > given the pagename, how do I query for all the usernames that visited > the blog? > > Thanks > John > > -- > 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. > > -- 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.
