Releases: Automattic/mongoose
Releases · Automattic/mongoose
8.22.0
8.21.1
- fix(clone): fix parent doc for map subdocuments and array subdocuments #15958 AbdelrahmanHafez
- fix(document): when cloning a doc with subdocs, make sure the subdocs parent is the cloned doc #15904 #15901
- fix: respect currentTime schema option in bulkWrite updates #15976 sderrow
- types(models): support Mongoose query casting in AnyBulkWriteOperation filter property #15910
- types: add toBSON() to documents #15927
9.1.5
9.1.5 / 2026-01-20
- fix(map): validate map subdocument when loaded with init #15960 #15957 AbdelrahmanHafez
- fix(discriminator): prevent indexes and callQueue duplication with shared nested schemas #15974 #15966 AbdelrahmanHafez
- fix(subdocuments): do not pass parent path on init #15970 #15969 #15682 AbdelrahmanHafez
- types(inferrawdoctype): correct handling for subdocs and doc arrays #15967 #13772
- docs: improve grammar and clarity in TypeScript schema comments #15971 harshsinghpujari
9.1.4
9.1.4 / 2026-01-15
- fix: attach sessions to docs retrieved by cursor #15953 #15949 mjfwalsh
- fix(model): make hydrate() handle nested schema arrays #15964 #15956
- fix(clone): fix parent doc for map subdocuments and array subdocuments #15958 #15954 AbdelrahmanHafez
- fix: prevent crash when accessing nested paths on prototype #15962 #15961 som14062005
9.1.3
9.1.3 / 2026-01-09
- fix(model): support timestamps option to insertMany() as both boolean and QueryTimestampsConfig #15941 #15938
- fix(query): include preview of current and incoming update in error when merging normal update with pipeline #15939 #15928
- types(model): apply basic type casting to paths underneath subdocuments #15948 #15947
- types(utility): make WithLevel1NestedPaths correctly handle PopulatedDoc and other TypeScript unions with Document members #15942 #15923
- docs(schema): expose "DocumentArrayElement" #15590 hasezoey
9.1.2
9.1.2 / 2025-01-05
- fix(subdocs): pass options to pre-save hooks for subdocs #15921 #15920 AbdelrahmanHafez
- perf(model): select only _id when checking document existence during save() #15919 AbdelrahmanHafez
9.1.1
9.1.0
9.1.0 / 2025-12-29
- feat(model): make pathsToSave handle saving just a subpath of a modified path #15896
- feat(document+model): pass options to pre('deleteOne') and update+options to pre('updateOne') hooks #15908 #15870
- feat(versioning): optimistic concurrency exclude option, update docs for optimisticConcurrency options #15917 #15915 #15912 AbdelrahmanHafez
- feat(document): add support for getAtomics() to allow custom container types to utilize atomics #15817
- perf: optimize Object.keys() checks and optional chaining #15865 AbdelrahmanHafez
- fix: add support for typescript style enums #15914 #15913 mjfwebb
- fix(document): when cloning a doc with subdocs, make sure the subdocs parent is the cloned doc #15904 #15901
- types(models): support Mongoose query casting in AnyBulkWriteOperation filter property #15918 #15910
- types: allow calling create() with TRawDocType for better generics support #15903 #15902
- types(document): add id virtual getter by default to HydrateDocument<> if TOverrides is Record<string, never> #15906 #15900
- docs(schema): add lean to list of schema options #15907 #15894 #12081