Optional aliasesOptional depopulateif true, replace any conventionally populated paths with the original id in the output. Has no affect on virtual populated paths.
Optional flattenif true, convert Maps to POJOs. Useful if you want to JSON.stringify() the result of toObject().
Optional flattenif true, convert any ObjectIds in the result to 24 character hex strings.
Optional gettersapply all getters (path and virtual getters)
Optional minimizeremove empty objects (defaults to true)
Optional transformif set, mongoose will call this function to allow you to transform the returned object
Optional useIf 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.
Optional versionif false, exclude the version key (__v by default) from the output
Optional virtualsapply virtual getters (can override getters option)
Generated using TypeDoc
if
options.virtuals = true, you can setoptions.aliases = falseto skip applying aliases. This option is a no-op ifoptions.virtuals = false.