Skip to content

[9.0] Fix tsvector metadata cast for IReadOnlyList (#3984) - #3987

Merged
roji merged 1 commit into
hotfix/9.0.5from
roji-tsvector-backport-9-0
Oct 17, 2026
Merged

roji merged 1 commit into
hotfix/9.0.5from
roji-tsvector-backport-9-0

Conversation

@roji

@roji roji commented Oct 17, 2026

Copy link
Copy Markdown
Member

Backports #3984 (ebfff5e) to hotfix/9.0.5, addressing #3892.

Changes GetTsVectorProperties to cast its annotation to IReadOnlyList<string> rather than string[], matching both setters. Includes the original regression test unchanged; the patch exactly matches the source commit and requires no EF 9 adaptations.

Validation

Using session-local .NET SDK 9.0.312:

  • Confirmed Can_get_ts_vector_properties_from_read_only_list fails before the fix with InvalidCastException.
  • dotnet test test/EFCore.PG.Tests/EFCore.PG.Tests.csproj --no-restore --filter FullyQualifiedName~NpgsqlMetadataExtensionsTest --verbosity minimal: 23 passed, no failures or skips.

No database required. Cherry-pick provenance and original authorship are retained in the commit.

(cherry picked from commit ebfff5e)

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 44b42915-1a39-48c6-acb1-e376900c78ac
@roji
roji merged commit f1af648 into hotfix/9.0.5 Oct 17, 2026
10 checks passed
@roji
roji deleted the roji-tsvector-backport-9-0 branch October 17, 2026 09:56
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.

SetTsVectorProperties throws InvalidCastException when passed a non-array IReadOnlyList<string>

2 participants