次の問題があります。
あるカテゴリのすべての製品を取得したい
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")
ここで、カテゴリのすべての製品を取得する gql クエリを作成したいと思います。例えば:
Product.gql("WHERE channel.category == KEY (:1)", category_selected_key)
各チャネルはそのカテゴリを頻繁に変更できることに注意してください。そのため、CPU の余分な作業を避けるために高速なものが必要です。
ありがとう