Repository navigation
[release/11.0] Preserve inherited complex-property column prefixes in TPC mappings - #39270
Merged
AndriySvyryd merged 5 commits intoOct 20, 2026
Merged
Conversation
Co-authored-by: AndriySvyryd <[email protected]>
Copilot
AI
changed the title
[WIP] Fix TPC columns of complex property prefix issue
Preserve inherited complex-property column prefixes in TPC mappings
Oct 16, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped fix addresses the reported defect with focused regression coverage and no identified blocking issues.
0 open findings
What changed in this PR
Fixes #39244 by preserving inherited complex-property column prefixes in EF Core’s TPC mappings, preventing column reassignment when another complex property is added.
Changes:
- Preserve full nested prefixes in derived tables and views.
- Add mapping and migration regression coverage.
- Update SQL Server query baselines.
| File | Description |
|---|---|
| test/EFCore.SqlServer.FunctionalTests/Query/Inheritance/TPCInheritanceTableSplittingQuerySqlServerTest.cs | Update complex-property SQL baselines. |
| test/EFCore.SqlServer.FunctionalTests/Query/Inheritance/TPCInheritanceQuerySqlServerTestBase.cs | Update inherited-column SQL baselines. |
| test/EFCore.Relational.Tests/Migrations/Internal/MigrationsModelDifferTest.cs | Verify adding a property preserves existing columns. |
| test/EFCore.Relational.Tests/Metadata/RelationalModelTest.cs | Cover nested prefixes, repeated types, and abstract/concrete roots. |
| src/EFCore.Relational/Extensions/RelationalPropertyExtensions.cs | Apply prefixes to TPC derived store objects. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: AndriySvyryd <[email protected]>
AndriySvyryd
marked this pull request as ready for review
October 16, 2026 19:20
AndriySvyryd
requested review from
artl93 and
cincuranet
and
a balanced review from Copilot
October 16, 2026 19:20
Code coverage overviewLanguages: C# C# / code-coverage
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Co-authored-by: AndriySvyryd <[email protected]>
Co-authored-by: AndriySvyryd <[email protected]>
cincuranet
approved these changes
Oct 20, 2026
artl93
approved these changes
Oct 20, 2026
artl93
left a comment
Member
There was a problem hiding this comment.
New feature in 11.0. Customer reported. Approved.
This was referenced Oct 21, 2026
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.

Fixes #39244
Description
This fix applies inherited complex-property prefixes in TPC leaf tables and views, including nested paths to avoid name collisions:
Shipping.Zip→Shipping_Zip,Billing.Zip→Billing_Zip.Customer impact
Name collisions could silently cause existing values to be read as another property's data when adding a same-typed property. Explicit column names are a workaround. Making this fix after GA would be a breaking change for users already on GA.
How found
Customer-reported on 11.0-rc1
Regression
No. The support for this mapping is new in 11.0
Testing
Tests added.
Risk
Low, limited to relational column names for inherited complex properties in TPC.