Skip to content
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

Fix: Retaining null value for populated documents when _id is suppressed #9337

Merged
merged 3 commits into from Aug 22, 2020

Conversation

FelixRe0
Copy link
Contributor

Summary

Fix #9336

Added a null check to push null subdoc, preventing the error described in #9336.

Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @FelixRe0

Please add a test case to avoid regression.

Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vkarpov15 vkarpov15 added this to the 5.10.1 milestone Aug 22, 2020
@vkarpov15 vkarpov15 added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Aug 22, 2020
@vkarpov15 vkarpov15 merged commit 9bdb820 into Automattic:master Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Populate with retainNullValues enabled & omitting _id throws Cannot read property '$__setValue' of null
3 participants