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(query): update queries removes fields set to undefined #12797

Merged
merged 3 commits into from
Dec 16, 2022

Conversation

lpizzinidev
Copy link
Contributor

fix #12794

Summary
Update queries now remove a field set to undefined as by expected behavior (starting from Mongoose 6) specified here.

test/query.test.js Outdated Show resolved Hide resolved
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 merged commit ff67167 into Automattic:master Dec 16, 2022
@lpizzinidev lpizzinidev deleted the gh-12794 branch December 17, 2022 08:46
lpizzinidev added a commit to lpizzinidev/mongoose that referenced this pull request Feb 4, 2023
lpizzinidev added a commit to lpizzinidev/mongoose that referenced this pull request Feb 7, 2023
vkarpov15 added a commit that referenced this pull request Feb 13, 2023
fix(query): revert breaking changes introduced by #12797
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

findOneAndUpdate() doesn't remove fields set to undefined
3 participants