NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #4415 most downloaded on npm
Mongoose MongoDB ODM
Latest stable
9.12.1
Last release 4 days ago
12 Nov 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 57 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
16 years old
1034 releases · first in 2010
Drag across the ruler to compare, or tap a release to open it.
fix(subdocument): don't minimize empty document array elements to null #16393 WaleedAshraf
fix(documentarray): reindex subdocs after array reordering and removal so subsequent nested changes save using the correct path #16282 AbdelrahmanHafe
Document.prototype.get()Your coding agent can read these notes before it upgrades. Set up the MCP server →
feat(aggregate): add pipelineForUnionWith() helper to allow reusing pipelines with $unionWith in TypeScript #16247 #16041 #16033
fix(model): support sort option in Model.bulkWrite() updateOne and replaceOne operations #16091 #16079
feat(document): add flattenUUIDs option to toObject() and toJSON() (backport #15021 to 8.x)
fix: handle other top-level query operators in sanitizeFilter
feat(model): allow passing strict option to hydrate() #15944 #15940
fix(clone): fix parent doc for map subdocuments and array subdocuments #15958 AbdelrahmanHafez
feat(document): add support for getAtomics() to allow custom container types to utilize atomics #15817
fix(model): ensure $isDeleted is set after calling doc.deleteOne() successfully #15898
perf: use Object.hasOwn instead of Object#hasOwnProperty #15875 AbdelrahmanHafez
fix(model): bump version if necessary after successful bulkSave() #15809 #15800
types: correct Model.schema type and fix unknown check for this param type in schema.methods #15750 #15693
feat: cast id parameter based on schema _id type in DocumentArray.id() #15733 #15725 #15724 Lex-Ashu
fix(schema): avoid throwing error on array of unions #15720 #15718
fix(model+plugins): correctly apply shard key on deleteOne() #15705 #15701
perf(setDefaultsOnInsert): avoid computing all modified paths when running setDefaultsOnInsert and update validators, only calculate if there are defa
perf: avoid getting all modified paths in update when checking if versionKey needs to be set #15677 #15672
feat: upgrade mongodb driver to 6.20.0 #15651 #15656
fix(update): avoid throwing error if update has a top-level $addToSet with no path #15648 #15642
fix(document): prevent $clone() from converting mongoose arrays into vanilla arrays #15633 #15625
types: correct type inference for maps of maps #15602
feat(schema): support for union types #15574 #10894
fix: avoid Model.validate() hanging when all paths fail casting #15580 #15579 piotracalski
fix(query): propagate read preference and read concern to populate if read() called after populate() #15567 #15553
feat: upgrade mongodb -> 6.18.0 #15552
fix(map): avoid throwing required error if saving map of primitives with required: true #15542
fix(connection): avoid calling connection.close() internally with force: Object #15534 #15531
fix(document): clean modified subpaths if unsetting map #15520 #15519
fix(cursor): populate after hydrating in queryCursor so populated docs get parent() #15498 #15494
fix(document): avoid setting _skipMarkModified when setting nested path with merge option #15484 #11913
feat(model): add Model.createSearchIndexes() #15470 #15465
fix(document+schema): improve handling for setting paths underneath maps, including maps of maps #15477 #15461
types: correct handling of _id in ProjectionType #15432 #15418
feat: CSFLE support #15390 baileympearson
types(schema): allow post('init') #15413 #15412 #15333
fix(query): handle casting array filter paths underneath array filter paths with embedded discriminators #15388 #15386
fix: correct change tracking with maps of arrays of primitives and maps of maps #15374 #15350
feat: upgrade MongoDB driver -> 6.16 #15371
fix: export MongooseBulkSaveIncompleteError #15370 #15369
fix: avoid double calling validators on paths in document arrays underneath subdocuments #15338 #15335
fix(populate): handle virtual populate on array of UUIDs #15329 #15315
feat: bump mongodb driver -> 6.15.0
fix(document): avoid stripping out fields in discriminator schema after select: false field #15322 #15308
fix: match bson version with mongodb's bson version #15297 hasezoey
feat: bump mongodb driver to 6.14
feat(model): make bulkWrite results include MongoDB bulk write errors as well as validation errors #15271 #15265
fix(model+connection): return MongoDB BulkWriteResult instance even if no valid ops #15266 #15265
perf(document): only call undoReset() 1x/document #15257 #15255
feat(schema+schematype): add toJSONSchema() method to convert schemas and schematypes to JSON schema #15184 #11162
hydrate() handle hydrating deeply nested populated docs with hydratedPopulatedDocs #15130fix: avoid applying defaults on map embedded paths #15217 #15196
fix(document): allow setting values to undefined with set(obj) syntax with strict: false #15207 #15192
fix: disallow nested $where in populate match
fix(document): fix document not applying manual populate when using a function in schema.options.ref #15138 IchirokuXVI
fix(schema): make duplicate index error a warning for now to prevent blocking upgrading #15135 #15112 #15109
fix(schema): avoid throwing duplicate index error if index spec keys have different order or index has a custom name #15112 #15109
fix(connection): remove heartbeat check in load balanced mode #15089 #15042 #14812
feat: add int32 schematype #15054 aditi-khare-mongoDB
fix: cast using overwritten embedded discriminator key when set #15076 #15051
fix: disallow using $where in match
One column per quarter.