Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PopulateOptions

Index

Properties

path: string

space delimited path(s) to populate

select?: any

fields to select

match?: any

query conditions to match

model?: string | <internal>.Model<any, {}, {}, {}, any>

optional model to use for population

options?: QueryOptions<unknown>

optional query options like sort, limit, etc

perDocumentLimit?: number

correct limit on populated array

strictPopulate?: boolean

optional boolean, set to false to allow populating paths that aren't in the schema

populate?: string | PopulateOptions | (string | PopulateOptions)[]

deep populate

justOne?: boolean

If true Mongoose will always set path to a document, or null if no document was found. If false Mongoose will always set path to an array, which will be empty if no documents are found. Inferred from schema by default.

localField?: string

Overwrite the schema-level local field to populate on if this is a populated virtual.

foreignField?: string

Overwrite the schema-level foreign field to populate on if this is a populated virtual.

Methods

  • transform(doc: any, id: any): any
  • transform function to call on every populated doc

    Parameters

    • doc: any
    • id: any

    Returns any

Generated using TypeDoc