Skip to content

[8.0] Fix tsvector metadata cast for IReadOnlyList - #3985

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

roji merged 1 commit into
hotfix/8.0.12from
roji-tsvector-backport-8-0

Conversation

@roji

@roji roji commented Oct 17, 2026

Copy link
Copy Markdown
Member

Backports #3984 (ebfff5e) to 8.0. Related issue: #3892.

Changes GetTsVectorProperties() to cast the annotation to IReadOnlyList<string> instead of string[], matching both setters. Includes the original collection-expression regression test without changes.

Validation:

  • Confirmed the regression test fails before the fix with InvalidCastException.
  • All 23 tests in NpgsqlMetadataExtensionsTest pass after the fix:
    dotnet test test/EFCore.PG.Tests/EFCore.PG.Tests.csproj --no-restore --filter FullyQualifiedName~NpgsqlMetadataExtensionsTest --verbosity minimal
  • No database required.

Backport #3984 for #3892.

(cherry picked from commit ebfff5e)

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 7b444553-37cd-4668-bf8f-a930eaabdb4d
@roji
roji merged commit d6c9d18 into hotfix/8.0.12 Oct 17, 2026
8 of 9 checks passed
@roji
roji deleted the roji-tsvector-backport-8-0 branch October 17, 2026 09:57
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>

1 participant