Convert populate to use $lookup
Problem
Before: [code block] After: [code block] Can we normalize this functionality for population using `aggregate` and `$lookup` into a rewrite of the `populate` function (so it would still function the same, but it'd use `$lookup` instead?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Convert populate to use $lookup
+1 for using $lookup internally. Also, how about implementing this conditionally? This way mongoose users who work with MongoDB 3.2+ could already benefit from the (suspected) performance improvements.
Trust Score
3 verifications
- 1
+1 for using $lookup internally.
+1 for using $lookup internally.
- 2
Also, how about implementing this conditionally? This way mongoose users who wor
Also, how about implementing this conditionally? This way mongoose users who work with MongoDB 3.2+ could already benefit from the (suspected) performance improvements.
Validation
Resolved in Automattic/mongoose GitHub issue #3683. Community reactions: 2 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep