From a39ff3cc145c33624abde9bdffdf86848e178e69 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Thu, 3 Oct 2013 10:00:08 -0700 Subject: [PATCH] Add comment about doing real upsert for mongo id generation --- packages/mongo-livedata/mongo_driver.js | 3 +++ 1 file changed, 3 insertions(+) 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,