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(document): call pre('validate') hooks when modifying a path underneath triply nested subdoc #13912

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #13876

Summary

Re: #13339. A couple related issues:

  1. If setting a path underneath a single nested subdoc, need to be careful to set on both doc and doc._doc if there isn't a setter for the path (for example, with strict: false).
  2. When running _getPathsToValidate() underneath a single nested subdoc, need to get paths relative to parent.

Examples

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

@vkarpov15 vkarpov15 added this to the 7.5.4 milestone Oct 3, 2023
@vkarpov15 vkarpov15 merged commit 34fea9e into master Oct 3, 2023
42 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-13876 branch October 3, 2023 19:00
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') hook does not trigger when using set + save since 7.1.1
2 participants