Repository navigation
Add regression tests for three issues already fixed - #39165
Merged
AndriySvyryd merged 3 commits intoOct 8, 2026
Merged
AndriySvyryd merged 3 commits into
AndriySvyryd merged 3 commits into
Conversation
…ifier that begins with Go Fixes dotnet#34183
…ed name matches another foreign key Fixes dotnet#28488
…a JSON collection Fixes dotnet#32513
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused test-only changes cover the stated regressions, with no blocking issues identified.
Review effort: Balanced
Findings: None
What changed in this PR
Adds regression tests for three issues already fixed on main, without changing production code.
Changes:
- Preserves migration SQL containing identifiers beginning with “Go” (#34183).
- Covers truncated foreign-key name collisions during table splitting (#28488).
- Verifies validation errors for nested JSON collections mapped to different columns (#32513).
| File | Description |
|---|---|
| test/EFCore.SqlServer.FunctionalTests/Migrations/SqlServerMigrationsSqlGeneratorTest.cs | Tests preservation of the GoodColumn SQL line. |
| test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.Json.cs | Tests nested OwnsMany JSON column validation. |
| test/EFCore.Relational.Tests/Infrastructure/RelationalModelValidatorTest.cs | Tests table-splitting foreign keys with colliding truncated names. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
AndriySvyryd
approved these changes
Oct 8, 2026
AndriySvyryd
left a comment
Member
There was a problem hiding this comment.
Thanks for your contribution!
AndriySvyryd
enabled auto-merge (squash)
October 8, 2026 00:05
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 #34183
Fixes #28488
Fixes #32513
These three issues no longer reproduce on main. This PR adds a test for each so they stay fixed, and lets them be closed.
migrationBuilder.Sql):SqlServerMigrationsSqlGeneratornow treats a line as a batch separator only when it isGOalone or followed by whitespace. No existing test covered a line that starts with an identifier beginning with "Go".SqlOperation_ignores_line_starting_with_go_identifieruses the SQL from the issue, including theGoodColumn,line.RelationalForeignKeyExtensions.GetDefaultNamemakes the table-splitting FK's store constraint name null, so validation passes. The test fails with the issue's exact message if that check is removed.ToJson()on a nested owned type): Throw when a nested entity type is mapped to a different JSON column. #34816 made this throwJsonEntityMappedToDifferentColumnThanOwner, but only tested OwnsOne inside OwnsOne. The new test covers the issue's shape, OwnsMany inside OwnsMany.Test-only change; no product code is touched.