I wonder if anybody has encountered the strange problem on Google App Engine\'s NDB: after creating a new entity and saving it by put()
; and then query()<
This is expected behaviour; your queries above are only eventually consistent. That is, you're not guaranteed to get the very latest results when querying.
You can get around this by using an ancestor query (see the link above). For your example, you'd need to give each of your items a parent entity and then use Item.query().ancestor(theParentEntity).fetch()
.