From 87cda35abbbc6599b29c1a4b46d41cc8b8aaf177 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Wed, 13 Apr 2022 13:02:24 -0400 Subject: [PATCH] chore: release 6.2.11 --- CHANGELOG.md | 11 +++++++++++ lib/schema.js | 1 + package.json | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3549fabd34..581a153860a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +6.2.11 / 2022-04-13 +=================== + * fix(document): handle validation with triply nested document arrays #11564 + * fix(query): skip applying string schema setters on $regex #11426 + * fix: skip findOneAndReplace() validation if runValidators = false #11559 + * fix(model): correctly handle schema-level collations in syncIndexes() #7621 + * fix(types): correct populate query return type with lean #11560 [mohammad0-0ahmad](https://github.com/mohammad0-0ahmad) + * fix(types): allow using { type: Mixed } as schema type definition for any path #10900 + * docs: fix example on Schema.prototype.post() #11648 [EmilienLeroy](https://github.com/EmilienLeroy) + * docs: fix typo in methods/index.js #11651 [eltociear](https://github.com/eltociear) + 6.2.10 / 2022-04-04 =================== * fix(types): improve lastErrorObject typing for rawResults #11602 [simllll](https://github.com/simllll) diff --git a/lib/schema.js b/lib/schema.js index 517509e8b81..bf400e4cad6 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -1010,6 +1010,7 @@ Schema.prototype.interpretAsType = function(path, obj, options) { if (options.hasOwnProperty('strict')) { childSchemaOptions.strict = options.strict; } + if (this._userProvidedOptions.hasOwnProperty('_id')) { childSchemaOptions._id = this._userProvidedOptions._id; } else if (Schema.Types.DocumentArray.defaultOptions._id != null) { diff --git a/package.json b/package.json index 1aecb5c62a4..abbc4a1b6ac 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mongoose", "description": "Mongoose MongoDB ODM", - "version": "6.2.10", + "version": "6.2.11", "author": "Guillermo Rauch ", "keywords": [ "mongodb",