-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Follow up to "populated documents get saved as strings" #14827
Comments
vkarpov15
added a commit
that referenced
this issue
Aug 28, 2024
…ng schemas to avoid modifying original obj Fix #14827
vkarpov15
added a commit
that referenced
this issue
Aug 28, 2024
fix(populate): fix a couple of other places where we get the document's _id with getters
This was referenced Sep 19, 2024
This was referenced Sep 19, 2024
This was referenced Sep 24, 2024
This was referenced Sep 25, 2024
This was referenced Sep 25, 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
20.15.1
MongoDB server version
7.0.12
Typescript version (if applicable)
No response
Description
There is an edge case that we missed in #14759. When calling populate on a document the
_id
is again stored as a string in the DB.I was able to track it down to this line. But this may not be the whole picture.
mongoose/lib/helpers/populate/getModelsMapForPopulate.js
Line 629 in 9572cbd
Steps to Reproduce
It's the same example as in #14759 but I added
pet.populate('owner')
beforepet.save()
.Expected Behavior
No response
The text was updated successfully, but these errors were encountered: