You are correct, performing the two separate queries is the correct way of retrieving the Post entities made by the authors who are followed by current_user.
A JOIN operation is actually the same thing, just in SQL syntax. The first step would be to JOIN all 'Post' entities with 'Following' entities where 'author' is equal. This would then produce a new table containing combined rows of the two kinds on 'author'. Once you have the JOINed result, you would then perform another query for all 'followed_by' equal to 'current_user', and you would get your Posts. So you can see how your current implementation is the most optimized. If anything, you could do a projection query <https://cloud.google.com/appengine/docs/standard/java/datastore/projectionqueries> on the first Following query to only receive the list of 'author's IDs instead of the entire Following objects. This would save you a bit of networking time and costs. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/45728c3d-4908-439e-b5db-4b1775bcc0c9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
