Skip to content

[10.0] Translate ToString() on string expressions - #4050

Merged
roji merged 1 commit into
hotfix/10.0.4from
roji-string-tostring-backport-10-0
Oct 20, 2026
Merged

roji merged 1 commit into
hotfix/10.0.4from
roji-string-tostring-backport-10-0

Conversation

@roji

@roji roji commented Oct 20, 2026

Copy link
Copy Markdown
Member

Backport #4047 to hotfix/10.0.4.

Return string-mapped instances unchanged in NpgsqlObjectToStringTranslator, matching SQL Server and SQLite. Includes regression coverage for string predicates, null propagation, object-typed grouping keys used in OrderBy/Where, and inherited GearsOfWar/TPC/TPT string projection SQL assertions. Release-branch adaptations are limited to the TPC/TPT file locations and EF 10's element sorter nullable annotation.

Fixes #4046.
Related to dotnet/efcore#20839 and its upstream fix dotnet/efcore#29349.

Validation: .NET SDK 10.0.300 with VSTest against a dedicated PostgreSQL 17 container, with both inherited shared connection variables unset. All 10 focused regressions passed; the broader string translation and ToString_ selection passed 160/160 tests.

Backport #4047 (5374dda) with its regression coverage. Adapt test paths and the EF 10 element sorter nullable annotation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b3737668-7ab2-46a4-9dcb-53e88f145a02
@roji
roji merged commit 87f3896 into hotfix/10.0.4 Oct 20, 2026
11 checks passed
@roji
roji deleted the roji-string-tostring-backport-10-0 branch October 20, 2026 12:51
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.

ToString() on a string expression fails to translate (“Translation of method ‘object.ToString’ failed”)

1 participant