diff --git a/packages/mongo-livedata/mongo_driver.js b/packages/mongo-livedata/mongo_driver.js index e43b54563a..1f7e999542 100644 --- a/packages/mongo-livedata/mongo_driver.js +++ b/packages/mongo-livedata/mongo_driver.js @@ -337,6 +337,9 @@ MongoConnection.prototype._update = function (collection_name, selector, mod, var knownId = (isModify ? selector._id : mod._id); if (options.upsert && (! knownId) && options.insertedId) { + // XXX In future we could do a real upsert for the mongo id generation + // case, if the the node mongo driver gives us back the id of the upserted + // doc (which our current version does not). simulateUpsertWithInsertedId( collection, mongoSelector, mongoMod, isModify, options,