Matt Daley
Matt Daley

Reputation: 458

Do kindless ancestor queries always return the ancestor first?

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

Answers (1)

Dan McGrath
Dan McGrath

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

Related Questions