Skip to content

fix(document): clean up all array subdocument modified paths on save() #13589

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

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #13582

Summary

#13582 points out that we didn't correctly clear modifiedPaths() on array subdocuments, other than the first subdocument in the array. This PR fixes that, but it looks like the fix for #6818 succeeded because of the buggy behavior. So we added some new logic to explicitly validate the parent array if making changes underneath a document array.

Examples

@vkarpov15 vkarpov15 force-pushed the vkarpov15/gh-13582 branch from b258914 to 422dff4 Compare July 9, 2023 00:09
Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

LGTM

@vkarpov15 vkarpov15 merged commit e94ca23 into master Jul 10, 2023
@hasezoey hasezoey deleted the vkarpov15/gh-13582 branch July 10, 2023 15:45
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.

Modified paths does not reset properly on subdocuments after document save
4 participants