Reputation: 458
GQL allows Kindless ancestor queries (https://cloud.google.com/appengine/docs/standard/python/datastore/queries#kindless_ancestor_queries) where you can query in one go for both an ancestor and all of its descendants. As far as I can tell the ancestor is always returned first, followed by all the descendants? However, I can't find anything that confirms this.
So, my question: is it always the case that the ancestor is returned first followed by all of the descendants? And is there any documentation that confirms this point?
The reason for asking is that I can keep my code simpler if I know that the ancestor is always first.
Upvotes: 0
Views: 121
Reputation: 42018
This is an implementation detail that can change in the future. Do not rely upon this ordering as it will most likely lead your code to break in the future.
Upvotes: 1