Skip to content

[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
Revert37781
Mar 5, 2026
Merged

[release/10.0] Revert "Fix complex property JSON column not marked nullable in TPH hierarchy (#37781)"#37849
AndriySvyryd merged 1 commit intorelease/10.0from
Revert37781

Conversation

@AndriySvyryd
Copy link
Copy Markdown
Member

This was merged to the wrong branch

@AndriySvyryd AndriySvyryd requested a review from a team as a code owner March 4, 2026 22:51
Copilot AI review requested due to automatic review settings March 4, 2026 22:51
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

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.CreateContainerColumn logic 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.

@AndriySvyryd AndriySvyryd enabled auto-merge (squash) March 4, 2026 22:53
@AndriySvyryd AndriySvyryd merged commit 040b072 into release/10.0 Mar 5, 2026
12 checks passed
@AndriySvyryd AndriySvyryd deleted the Revert37781 branch March 5, 2026 00:01
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