I wanted to ask if there is a direct and efficient way to get the child of a parent entity.
I am modelling a follower/ following relationship(like twitter). So I have a user model and a message model. I have a Follower and Following model which have a user model as a parent.
So whenever a user writes a message(or say tweet), all his followers should be able to get that. In this case I need to figure out who are the followers of the user(who sends a message).
Any help is greatly appreciated
Use ancestor queries. https://developers.google.com/appengine/docs/python/datastore/queryclass#Query_ancestor Or https://developers.google.com/appengine/docs/python/ndb/queries#ancestor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With