I have the following problem:
I'd like to retrieve all products of a category
class Category(emodel):
name = db.StringProperty()
class Channel(emodel):
name = db.StringProperty()
category = db.ReferenceProperty(Category,collection_name="cat_set")
class Product(emodel):
name = db.StringProperty()
channel = db.ReferenceProperty(Channel,collection_name="ch_set")
Now I'd like to write a gql query which retrive all profuct of a category. for example:
Product.gql("WHERE channel.category == KEY (:1)", category_selected_key)
Keep in mind that each Channel can change often its category, so I'd like something fast to avoid extra work for cpu
thanks