The old Collection.UpsertId() trick to get the _id value of the latest inserted item stopped to work. This workaround allocates a new _id and then updates the item.
Defining an external test server for MySQL.
Defining an external test server for PostgreSQL.
Testing on external server.