[release/10.0] Revert "Fix complex property JSON column not marked nullable in TPH hierarchy (#37781)"#37849
Merged
AndriySvyryd merged 1 commit intorelease/10.0from Mar 5, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Reverts the previously merged fix for JSON column nullability in TPH hierarchies, because it was merged into the wrong branch (release/10.0). This restores the prior relational-model behavior and aligns associated tests/baselines accordingly.
Changes:
- Revert
RelationalModel.CreateContainerColumnlogic that made complex-property JSON columns nullable for TPH scenarios. - Remove the Relational test that asserted JSON column nullability in a TPH hierarchy.
- Update the SQL Server scaffolding baseline to match the reverted nullability behavior for the affected JSON column.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/ComplexTypes/DbContextModelBuilder.cs | Reverts the baseline JSON column IsNullable initializer for ManyOwned to match pre-fix output. |
| test/EFCore.Relational.Tests/Metadata/RelationalModelTest.cs | Removes the test coverage that validated the reverted TPH JSON column nullability behavior. |
| src/EFCore.Relational/Metadata/Internal/RelationalModel.cs | Reverts the nullability computation for complex-property JSON container columns by removing the TPH-specific nullable handling. |
You can also share your feedback on Copilot code review. Take the survey.
roji
approved these changes
Mar 4, 2026
This was referenced Mar 5, 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.
This was merged to the wrong branch