Описание тега mongoose-populate

The Mongoose ODM has a populate() feature which lets you reference related documents in other collections. Mongoose can populate a single document, multiple documents, plain object, multiple plain objects, or all objects returned from a query.

MongoDB 3.2+ servers include a $lookup aggregation feature which enables joining query results from multiple collections in the same database.

The Mongoose ODM provides a client-side alternative called populate(), which lets you reference related documents in other collections (including those in different databases).

Population is the process of automatically replacing the specified paths in the document with document(s) from other collection(s). Mongoose can populate a single document, multiple documents, plain object, multiple plain objects, or all objects returned from a query.

Related Links