Skip to content

Refactor CommandBatchPreparer#38133

Merged
AndriySvyryd merged 2 commits intomainfrom
RefactorCommandBatchPreparer
Apr 18, 2026
Merged

Refactor CommandBatchPreparer#38133
AndriySvyryd merged 2 commits intomainfrom
RefactorCommandBatchPreparer

Conversation

@AndriySvyryd
Copy link
Copy Markdown
Member

No description provided.

@AndriySvyryd AndriySvyryd requested a review from a team as a code owner April 17, 2026 21:11
Copilot AI review requested due to automatic review settings April 17, 2026 21:11
@AndriySvyryd AndriySvyryd enabled auto-merge (squash) April 17, 2026 21:11
@AndriySvyryd AndriySvyryd force-pushed the RefactorCommandBatchPreparer branch from f21e654 to eb6fe8e Compare April 17, 2026 21:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors how CommandBatchPreparer builds foreign-key dependency ordering between modification commands by extracting the predecessor collection and edge creation logic into reusable helpers.

Changes:

  • Extracted FK predecessor-map creation into AddForeignKeyPredecessors(...).
  • Extracted FK edge creation into an overloaded AddForeignKeyEdges(...) and introduced shared helper methods for FK key extraction.
  • Made the IForeignKeyConstraint overload of AddMatchingPredecessorEdge require an explicit checkStoreGenerated argument.

Comment thread src/EFCore.Relational/Update/Internal/CommandBatchPreparer.cs Outdated
Comment thread src/EFCore.Relational/Update/Internal/CommandBatchPreparer.cs Outdated
@AndriySvyryd AndriySvyryd merged commit 0a06b01 into main Apr 18, 2026
15 checks passed
@AndriySvyryd AndriySvyryd deleted the RefactorCommandBatchPreparer branch April 18, 2026 06:21
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.

3 participants