Skip to content

feat: accept array of parent entity classes in cascade deletion rule - #650

Merged
gwdp merged 1 commit into
mainfrom
gwdp/parent-cascade-multiple-classes
Jul 9, 2026
Merged

feat: accept array of parent entity classes in cascade deletion rule#650
gwdp merged 1 commit into
mainfrom
gwdp/parent-cascade-multiple-classes

Conversation

@gwdp

@gwdp gwdp commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Why

AllowIfInParentCascadeDeletionPrivacyPolicyRule only accepts a single parentEntityClass, but sibling entity classes backed by the same table need separate rules for each. This adds up when you have entities that share a table but aren't in an inheritance chain.

Thread: https://app.graphite.com/github/pr/expo/universe/28900#discussion-IC_kwDOAz9RTM8AAAABJd5cSg

How

parentEntityClass now accepts a single class or an array. Backward compatible — single class works identically.

Test Plan

New test cases for array form. Existing 740 tests pass.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4709f53) to head (2f30bdd).
⚠️ Report is 90 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #650    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          110       109     -1     
  Lines        17588     17755   +167     
  Branches      1515       919   -596     
==========================================
+ Hits         17588     17755   +167     
Flag Coverage Δ
integration 28.60% <0.00%> (+0.25%) ⬆️
unittest 94.53% <100.00%> (-0.67%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp
gwdp marked this pull request as ready for review July 9, 2026 23:41
@gwdp
gwdp requested a review from wschurman as a code owner July 9, 2026 23:41
@gwdp
gwdp merged commit df75910 into main Jul 9, 2026
6 checks passed
@gwdp
gwdp deleted the gwdp/parent-cascade-multiple-classes branch July 9, 2026 23:46
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.

2 participants