Getting entity's id inside a transaction
问题 I have a datastore transaction where I create an entity (a user) letting datastore generate the ID for me. I then would like to use that ID so that I can create another entity (of another kind). While this is possible with regular datastore 'save' api: datastore.save(user).then(() => { userId = user.key.id // returns entity's ID created by datastore }) However, this does not seem possible when using a transaction: transaction.save(user).then(() => { console.log( user.key.id ) }) The above