Skip to content

MONGOID-5888 Ensure deeply nested children are validated correctly #6028

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jamis
Copy link
Contributor

@jamis jamis commented Jul 31, 2025

With #6012 (MONGOID-5848, reverting a change that caused a performance regression), validation failures of deeply nested children (i.e. grandchildren and deeper) no longer interrupt the transaction for saving a parent. This PR addresses that by adding a new internal flag (children_may_have_changed) that the changed API now uses to indicate whether a document should validate it's children or not.

The value of that flag is set to true when a child document is processed via nested attributes.

@jamis jamis requested a review from a team as a code owner July 31, 2025 16:08
@jamis jamis requested a review from comandeo-mongo July 31, 2025 16:08
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.

1 participant