mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add comment about doing real upsert for mongo id generation
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user