Ancestor queries in GAE can return the ancestor in the results:
- when ancestor and query kind are the same, eg.:
SomeModel.query(ancestor=some_key)
- on kindless query, eg.:
ndb.Query(ancestor=some_key)
To filter out ancestor instance from being fetched use filter on __key__:
SomeModel.query(ancestor=some_key).filter(SomeModel.key > some_key)