Skip to content

Commit

Permalink
Merge pull request #10414 from AbdelrahmanHafez/gh-9010
Browse files Browse the repository at this point in the history
Allow usage of schema reserved keywords
  • Loading branch information
vkarpov15 committed Aug 20, 2021
2 parents 744eaa1 + 05bbdf1 commit 14dd60b
Show file tree
Hide file tree
Showing 32 changed files with 626 additions and 220 deletions.
5 changes: 1 addition & 4 deletions benchmarks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,4 @@ run('array of docs', function() {
});
});

// console.error(a.toObject({depopulate:true}));
console.error('completed %d docs in %d seconds (%d dps)', numdocs, totaltime, numdocs / totaltime);

// --trace-opt --trace-deopt --trace-bailout
console.error('completed %d docs in %d seconds (%d dps)', numdocs, totaltime, numdocs / totaltime);
2 changes: 1 addition & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ Connection.prototype.transaction = function transaction(fn, options) {
for (const doc of session[sessionNewDocuments].keys()) {
const state = session[sessionNewDocuments].get(doc);
if (state.hasOwnProperty('isNew')) {
doc.isNew = state.isNew;
doc.$isNew = state.$isNew;
}
if (state.hasOwnProperty('versionKey')) {
doc.set(doc.schema.options.versionKey, state.versionKey);
Expand Down
2 changes: 1 addition & 1 deletion lib/cursor/QueryCursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ function _create(ctx, doc, populatedIds, cb) {
{ populated: populatedIds } :
undefined;

instance.init(doc, opts, function(err) {
instance.$init(doc, opts, function(err) {
if (err) {
return cb(err);
}
Expand Down

0 comments on commit 14dd60b

Please sign in to comment.