Skip to content

Restore soft-deleted dependents on recursive restore#82

Open
simi wants to merge 1 commit into
masterfrom
fix-recursive-restore
Open

Restore soft-deleted dependents on recursive restore#82
simi wants to merge 1 commit into
masterfrom
fix-recursive-restore

Conversation

@simi

@simi simi commented Jul 19, 2026

Copy link
Copy Markdown
Owner

restore(recursive: true) read dependents via send(name) under the paranoia default scope, so soft-deleted children were skipped when the parent was reloaded before restoring. Now reads them unscoped, with a regression spec (the old specs reused a cached in-memory parent and missed it). Green on Mongoid 7/8/9.

Ports #30 by @kouyaf77 (co-authored), without its Mongoid::Relations::Synchronization patch (removed in Mongoid 7).

Closes #30

restore_relations read dependents under the default scope, so soft-deleted
children were skipped when the parent was reloaded before restoring. Read them
unscoped. Supersedes #30.

Co-authored-by: KouyaFukuda <kouyaf77@gmail.com>
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