GQL query to effectively span entity relationships
问题 I'm in a situation where I need to span Google App Engine entity relationships in a query like in the Django database model. I'm using ListProperty s for one-to-many relationships, like so: class Foo(db.Model): bars = db.ListProperty(db.Key) class Bar(db.Model): eggs = db.ListProperty(db.Key) And I'd like to perform a query that does the following: # Foo.filter('bars.eggs =', target_egg) [foo for egg in eggs if egg == target_egg for eggs in bar.eggs for bar in foo.bars for foo in Foo.all()]