Repository navigation
Conversation
Mongoid 8.1.12 (MONGOID-4889) rewrote Batchable#pre_process_batch_insert to use append_many, which drops children built with the inverse already set and re-sorts assigned batches by the relation order. Restore the one-at-a-time append version, document how to remove it, and add specs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gloox
changed the base branch from
PPS-34428-8.1.13-support-rails-8-1
to
upstream-v8.1.13
October 28, 2026 13:32
… ones Upstream only validates children that are new or changed, so a child validation that depends on the parent is skipped when only the parent changes. Upstream tried to fix this (MONGOID-5822) and reverted it (mongodb#6014). Restore validating all children, skipping those flagged for destroy. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
DiljotSG
approved these changes
Oct 28, 2026
…ciation The previous override read the association via read_attribute_for_validation, which loads it. Saving a parent then validated children nothing touched, so legacy data in an unloaded embedded child (e.g. a Property's Address with region "Stowe - VT") made unrelated saves fail. Go back to the old 8.1-stable-sc behavior: inspect the proxy through ivar so nothing is loaded, and validate every loaded child, new or not. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ole association" The old 8.1.7 fork loaded and validated every child, so v8.1.13-sc.3 matches it. Not loading broke property_import_spec in supply_chain. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For visibility only; this is not meant to be merged. supply_chain pins to the tag cut from this branch (
v8.1.13-sc.3).Upstream Mongoid 8.1.13 plus the overrides from the previous fork, some overrides are removed as they were adresssed in 8.1.13 and others were added as a result of some behaviour changes. Each override's code comment explains why it exists, how to remove it, and what can break when rebasing.
mongoid.gemspec): widened to< 8.2so 8.1.x works with Rails 8.1. Upstream did this on master/9.0-stable only.Batchable#pre_process_batch_insert): restores the pre-8.1.12 one-at-a-time append. MONGOID-4889's rewrite drops children built with the inverse set and re-sorts assigned batches.AssociatedValidator#validate_association): validates every child, not only new or changed ones. Upstream reverted its fix (MONGOID-5822, MONGOID-5848 Revert MONGOID-5822 (8.1 backport) mongodb/mongoid#6014).Specs are in
spec/mongoid/association/embedded/embeds_many/batch_insert_spec.rbandspec/mongoid/validatable/associated_all_children_spec.rb. They have not been run in this repo; supply_chain's own specs for both behaviors are the check.