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(setDefaultsOnInsert): avoid applying defaults on insert if nested property set #12390

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

vkarpov15
Copy link
Collaborator

Fix #12279

Summary

#12279 pointed out that we need to make sure we don't apply setDefaultsOnInsert on a subdoc path when a path nested underneath that subdoc path is $set. That makes the MongoDB server throw a Updating the path 'subscriptionsConfig.hasPaidSubscription' would create a conflict at 'subscriptionsConfig' error.

Examples

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.

LGTM, thanks 👍

@AbdelrahmanHafez AbdelrahmanHafez added this to the 6.5.5 milestone Sep 4, 2022
@vkarpov15 vkarpov15 merged commit 9939664 into master Sep 7, 2022
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-12279 branch September 7, 2022 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants