Repository navigation
Add convention builder APIs for JSON mapping - #39513
Merged
Merged
Conversation
- Add container column and JSON property name configuration APIs\n- Update JSON property name conventions and validation\n- Add relational model-builder coverage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot CLI created this pull request from a session on behalf of
AndriySvyryd
November 4, 2026 03:12
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The change removes a supported finalization extension point, breaking derived custom conventions, and lists nonexistent APIs in the baseline, causing CI baseline validation to fail.
2 open issues
What changed in this PR
Adds convention-builder APIs for JSON mapping in EF Core’s relational layer, allowing conventions to configure container columns and JSON property names with configuration-source precedence.
Changes:
- Adds complex-type JSON mapping APIs and entity-type container-column APIs.
- Retains attribute-derived JSON names and adjusts relational validation accordingly.
- Adds model-building tests and updates the public API baseline.
| File | Description |
|---|---|
test/EFCore.Relational.Specification.Tests/ModelBuilding/RelationalModelBuilderTest.cs |
Tests convention APIs, precedence, and retained attribute names. |
src/EFCore.Relational/Metadata/Conventions/RelationalPropertyJsonPropertyNameAttributeConvention.cs |
Uses the new builder API and removes finalization cleanup. |
src/EFCore.Relational/Infrastructure/RelationalModelValidator.cs |
Exempts attribute-configured JSON names from conflicting-mapping checks. |
src/EFCore.Relational/Extensions/RelationalEntityTypeBuilderExtensions.cs |
Adds container-column name and type convention APIs. |
src/EFCore.Relational/Extensions/RelationalComplexTypeBuilderExtensions.cs |
Adds complex-type JSON mapping convention APIs. |
src/EFCore.Relational/EFCore.Relational.baseline.json |
Updates API entries for the builders and attribute convention. |
Review effort: Balanced
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 |
AndriySvyryd
marked this pull request as ready for review
November 4, 2026 03:45
AndriySvyryd
enabled auto-merge (squash)
November 4, 2026 03:46
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
auto-merge was automatically disabled
November 4, 2026 03:51
Head branch was pushed to by a user without write access
cincuranet
approved these changes
Nov 5, 2026
Contributor
API review baseline changes for
|
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.

Adds convention-builder APIs for JSON container column names/types and JSON property names, updates attribute convention handling and relational validation, and adds relational model-builder tests.