Set the autogenerated last id if the doc does not contain one already.

Property definitions

mongodb $ MongoCollection :: set_id
	# 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
lib/mongodb/mongodb.nit:406,2--413,4