Document.prototype.execPopulate()
Parameters
- [callback] «Function» optional callback. If specified, a promise will not be returned
Returns:
- «Promise» promise that resolves to the document when population is done
Explicitly executes population and returns a promise. Useful for ES2015 integration.
Example:
const promise = doc.execPopulate({ path: 'company', select: 'employees' });
// summary promise.then(resolve,reject);
https://mongoosejs.com/docs/api/document.html#document_Document-execPopulate
'express' 카테고리의 다른 글
routing _express docs (0) | 2020.05.01 |
---|---|
mongoose (0) | 2020.05.01 |
payload (0) | 2020.04.29 |
Prifiles for Users /node (0) | 2020.04.28 |
Postman (0) | 2020.04.28 |