We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40c625d commit 516f060Copy full SHA for 516f060
lib/mongo/Mutator.js
@@ -139,6 +139,9 @@ export default class Mutator {
139
...findOptions,
140
fields: {},
141
}).fetchAsync();
142
+ } else if (Object.keys(selector).length === 1 && typeof selector._id === "string") {
143
+ // if we are updating a single document by id, we can skip the find
144
+ docs = [{ _id: selector._id }];
145
} else {
146
docs = await this.find(selector, findOptions).fetchAsync();
147
}
0 commit comments