I used GAE and NDB for a project. I just noticed that if I create several objects, and then I retrieve the list of these objects the order is not preserved (i use the
ids are strictly incremental (and incremental by one) in
ndb. You can set your own
ids and assure they autoincrement properly.
Or you can add to your model(s) a
created = ndb.DateTimeProperty(auto_now_add=True)
And in your view you can use a filter to sort the entities by the date of insertion, for ex:
posts = Post.query().order(-Post.created).fetch()
which will order and fetch your (let's say)
Post entities in the descending order of insertion dates.