apply virtual getters (can override getters option)
if options.virtuals = true
, you can set options.aliases = false
to skip applying aliases. This option is a no-op if options.virtuals = false
.
remove empty objects (defaults to true)
if set, mongoose will call this function to allow you to transform the returned object
if true, replace any conventionally populated paths with the original id in the output. Has no affect on virtual populated paths.
if false, exclude the version key (__v
by default) from the output
if true, convert Maps to POJOs. Useful if you want to JSON.stringify()
the result of toObject()
.
If true, omits fields that are excluded in this document's projection. Unless you specified a projection, this will omit any field that has select: false
in the schema.
Generated using TypeDoc
apply all getters (path and virtual getters)