mongodb :: MongoCollection :: set_id
doc
# Set the autogenerated last id if the `doc` does not contain one already. private fun set_id(doc: JsonObject) do var last_id = database.client.last_id if last_id != null then doc["_id"] = last_id.to_json database.client.last_id = null end end