Mongoose 5.2.5 发布了,Mongoose 是在 Node.js 异步环境下对 MongoDB 进行便捷操作的对象模型工具。
更新内容如下:
- fix(boolean): expose
convertToTrue
andconvertToFalse
for custom boolean casting #6758 - docs(schematypes): add note about what values are converted to booleans #6758
- fix(document): fix(document): report castError when setting single nested doc to array #6753
- docs: prefix mongoose.Schema call with new operator #6751 sajadtorkamani
- docs(query): add examples and links to schema writeConcern option for writeConcern helpers #6748
- docs(middleware): clarify that init middleware is sync #6747
- perf(model): create error rather than modifying stack for source map perf #6735
- fix(model): throw helpful error when passing object to aggregate() #6732
- fix(model): pass Model instance as context to applyGetters when calling getters for virtual populate #6726 lineus
- fix(documentarray): remove
isNew
andsave
listeners on CastError because otherwise they never get removed #6723 - docs(model+query): clarify when to use
countDocuments()
vsestimatedDocumentCount()
#6713 - fix(populate): correctly set virtual nestedSchemaPath when calling populate() multiple times #6644
- docs(connections): add note about the
family
option for IPv4 vs IPv6 and add port to example URIs #6566
下载地址:
转自 https://www.oschina.net/news/98275/mongoose-5-2-5-released