Document obsoletion of owned JSON collections without an explicit key (EF11)#5383
Merged
AndriySvyryd merged 5 commits intoJun 11, 2026
Merged
Conversation
Copilot
AI
changed the title
[WIP] Document the obsoletion of JSON owned entity support as breaking change
Document obsoletion of owned JSON collections without an explicit key (EF11)
Jun 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Documents an EF Core 11 breaking-change/deprecation: owned types mapped to JSON collections without an explicit primary key now raise OwnedEntityMappedToJsonCollectionWarning, and the pattern is considered obsolete going forward.
Changes:
- Adds a new low-impact breaking-changes entry (
#owned-json-collections-obsolete) using the standard Old/New/Why/Mitigations structure. - Updates the breaking changes summary table to include the new entry.
- Provides mitigations: prefer
ComplexCollection(...).ToJson(), or keepOwnsMany(...).ToJson()with an explicit key, or suppress viaConfigureWarnings.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
SamMonoRT
approved these changes
Jun 11, 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.
Per dotnet/efcore#38395, EF Core 11 raises an
OwnedEntityMappedToJsonCollectionWarningwhen an owned type is mapped to JSON as a collection without an explicit primary key (synthetic ordinal key). The original broader deprecation proposed in dotnet/efcore#37290 was narrowed to just this case.Changes
entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md#owned-json-collections-obsoletefollowing the standard Old/New/Why/Mitigations template.ConfigureWarnings.The new anchor is the intended target for the existing
aka.ms/efcore-docs-json-owned-entitiesredirect (redirect update handled separately).