Are facility children available on request?
Given:
class Factory(db.Model): """ Parent-kind """ name = db.StringProperty() class Product(db.Model): """ Child kind, use Product(parent=factory) to make """ @property def factory(self): return self.parent() serial = db.IntegerProperty()
Suppose that 500 factories produced 500 products for a total of 250,000 products. Is there a way to generate a resource-efficient query that will return only 500 products made by one particular factory? The ancestor method is a filter, therefore, using, for example, Product.all (). Ancestor (factory_1) will require repeated calls to the data warehouse.
google-app-engine ancestor gql
Thomas l holaday
source share