I haven’t been able to find a good simple tutorial on how to query many to many relationship model using GQL or any alternative. Can anyone give me an example with Python using GQL or any alternative?
EDIT:
results = RestaurantReview.all().filter("Restaurant = %s", restaurant_key).filter("User = %s", user[0].key().__str__()).fetch()
The error log of following reflects above statement:
'NoneType' object has no attribute 'group':
Is this related to DB List Property? If so, can you give example on this?
ManyToManyModel.all().filter("model1 =", model1_key).filter("model2 =", model2_key).fetch()ManyToManyModel is a model with two properties, both reference properties,
model1andmodel2.model1_keyandmodel2_keyare each a single key for their respective fields. For more in-depth information, see this helpful article in the documentation.