With the latest version of mongoose (mongoose >= 3.6), you can but it requires a second query, and using populate differently. After your aggregation, do this:
Patients.populate(result, {path: "patient"}, callback);
See more at the Mongoose API and the Mongoose docs.
More Related Contents:
- Push items into mongo array via mongoose
- E11000 duplicate key error index in mongodb mongoose
- Mongoose: findOneAndUpdate doesn’t return updated document
- Mongoose populate vs object nesting
- Stop Mongoose from creating _id property for sub-document array items
- Why does mongoose always add an s to the end of my collection name
- mongodb/mongoose findMany – find all documents with IDs listed in array
- Setting expiry time for a collection in mongodb using mongoose
- MongoError: The ‘cursor’ option is required, except for aggregate with the explain argument
- add created_at and updated_at fields to mongoose schemas
- Mongoose (mongodb) batch insert?
- (node:3341) DeprecationWarning: Mongoose: mpromise
- Mongoose deleting (pull) a document within an array, does not work with ObjectID
- Mongoose update without callback
- Automatically remove referencing objects on deletion in MongoDB
- How to fix ‘Error: querySrv EREFUSED’ when connecting to MongoDB Atlas?
- How to define object in array in Mongoose schema correctly with 2d geo index
- How can I generate an ObjectId with mongoose?
- How to get all count of mongoose model?
- Mongoose: CastError: Cast to ObjectId failed for value “[object Object]” at path “_id”
- Model.find() returns empty in mongoose [duplicate]
- Node.js – Mongoose – Check if a collection exists
- Mongoose – caused by :: 11000 E11000 duplicate key error index?
- How do I increment a Number value in Mongoose?
- How to reference another schema in my Mongoose schema?
- Mongoose findOneAndUpdate and runValidators not working
- Populate a mongoose model with a field that isn’t an id
- Mongoose select fields to return from findOneAndUpdate
- mongoose recursive populate
- MongoDB $lookup vs Mongoose populate