This looks simple, but I just didn't find how to get an entity's id from Google App Engine's ndb.
class Message(ndb.Model):
name: ndb.StringProperty()
...
Create a message object:
message = Message(id=someId)
message.name = someName
message.put()
Later when I retrieve the entity:
message = Message.query(Message.name==someName).fetch(1)
Now how do I get the message's id? Thanks.