Skip to content

Conversation

vkarpov15
Copy link
Collaborator

Fix #14591

Summary

Tricky issue: if you save() a doc, then set() a more than 3 level nested single nested path using dot notation, pre('validate') hooks don't fire because the subdoc paths aren't marked as modified beyond the 1st level.

This PR provides a reasonable fix for this particular case, but I will look more closely at how our change tracking handles subdocs as a followup to this work.

Examples

@vkarpov15 vkarpov15 added this to the 8.4.1 milestone May 17, 2024
@vkarpov15 vkarpov15 merged commit 2a8c532 into master May 24, 2024
@hasezoey hasezoey deleted the vkarpov15/gh-14591 branch May 24, 2024 14:29
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.

Pre validate: is not triggert on all sub documents when set via _.set() with a nested path
2 participants