更新时间:2021-08-29 22:28:37
使用最新版本的猫鼬(mongoose> = 3.6),您可以,但它需要第二次查询,并且使用不同的填充方式.汇总后,请执行以下操作:
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);