[Symbol(mongoose#trustedSymbol)]: true when there is match and localField is different from _id in populate #15263
Closed
2 tasks done
Labels
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Milestone
Prerequisites
Mongoose version
7.8.2
Node.js version
22.x
MongoDB server version
6.x
Typescript version (if applicable)
No response
Description
Hi!
I am bumping into issue like this #12834 .
That issue was related to _id. This time i have same issue because i dont use _id as localField in virtual field declaration.
I am getting
in console when add match in populate or in virtual field declaration.
Here is how my virtual field declaration looks like:
Here is how i tried to call it:
So i have a question, why not to use value from localField instead of hardcoded _id?
Steps to Reproduce
Expected Behavior
The text was updated successfully, but these errors were encountered: