mongoose

Mongoose versioning: when is it safe to disable it?

拥有回忆 提交于 2020-11-30 11:17:12
问题 From the docs: The versionKey is a property set on each document when first created by Mongoose. This keys value contains the internal revision of the document. The name of this document property is configurable. The default is __v. If this conflicts with your application you can configure as such: [...] Document versioning can also be disabled by setting the versionKey to false. DO NOT disable versioning unless you know what you are doing. But I'm curious, in which cases it should be safe to

Mongoose versioning: when is it safe to disable it?

烈酒焚心 提交于 2020-11-30 11:08:09
问题 From the docs: The versionKey is a property set on each document when first created by Mongoose. This keys value contains the internal revision of the document. The name of this document property is configurable. The default is __v. If this conflicts with your application you can configure as such: [...] Document versioning can also be disabled by setting the versionKey to false. DO NOT disable versioning unless you know what you are doing. But I'm curious, in which cases it should be safe to