I need orders / purchases that allow many items for instance something like
class Purchase(db.Model):
'''a completed transaction'''
item = db.ReferenceProperty(Item, repeated=True))
Is the repeated keyword legal and used in the correct manner here? What are my other options? Should I do it with a repeated stringproperty instead?
item_ids = model.StringProperty(repeated=True)
or with repeated KeyProperties?
Thanks
There is a ListProperty:
It is used like a python list:
In queries however it looks like a single-valued field. Every value of ListProperty is indexed separately.
Query below will return all purchases which contain the
item1:Query below will return all purchases which contain either
item1oritem2:If you will ever need to index more than one ListProperty don’t forget to familiarize your self with exploding-indexes.