-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate + lean + multiple populated documents leads to "Cannot read properties of undefined (reading '_id')" in version 8.5.2 #14794
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Comments
vkarpov15
added a commit
that referenced
this issue
Aug 11, 2024
fix populate called with lean (gh-14794)
Fixed by #14799 |
This was referenced Sep 4, 2024
This was referenced Sep 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Mongoose version
8.5.2
Node.js version
22
MongoDB server version
7.0
Typescript version (if applicable)
No response
Description
Populating with 'lean' and more then one model in a populated object cause in error in v8.5.2. All works fine i v.8.5.1. Without lean() all works fine too
Looks like it happens because of 7c2cfa8#diff-305dbcc98ad8fc959dd0c0be51280893962af34c2d8b18abc871cffc2d80c5f9R4471 as part of fix #14759
Steps to Reproduce
This an abstract sample how to reproduce it
Expected Behavior
Code return data
The text was updated successfully, but these errors were encountered: