Repository navigation
Fix collection conversion with nullable element converters - #3965
Merged
Merged
Conversation
Adapt converter input and output nullability to collection element types, preserving null handling. Fixes #3919 Co-authored-by: Copilot App <[email protected]> Copilot-Session: dcbb7a7a-9347-4d30-8206-8351ec6ef978
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused conversion fix preserves null handling and includes regression coverage, with no blocking issues identified.
0 open findings
What changed in this PR
Fixes #3919 by allowing collection conversions to use nullable element converters in the PostgreSQL provider.
Changes:
- Adapts converter inputs and outputs to collection element types while preserving null handling.
- Adds array and list round-trip regression tests.
- Enables the inherited nullable-converter query test with SQL assertions.
| File | Description |
|---|---|
| test/EFCore.PG.Tests/Storage/NpgsqlArrayValueConverterTest.cs | Adds array and list regression coverage. |
| test/EFCore.PG.FunctionalTests/Query/PrimitiveCollectionsQueryNpgsqlTest.cs | Replaces the expected exception with SQL assertions. |
| src/EFCore.PG/Storage/ValueConversion/NpgsqlArrayConverter.cs | Adapts element conversion types. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 15, 2026
roji
added a commit
that referenced
this pull request
Oct 15, 2026
) (#3967) Backport d33cdd4 to hotfix/10.0.4 without changes. Fixes #3919 Co-authored-by: Copilot App <[email protected]> Copilot-Session: a0c9ca96-101e-4909-bd99-0bc2e723f0d6
roji
added a commit
that referenced
this pull request
Oct 15, 2026
…) (#3968) Backport d33cdd4 to hotfix/9.0.5. Adapt element conversion input and output nullability while preserving existing null guards, with array/list round-trip coverage. The inherited nullable-comparer functional test from the original change is not available on this release branch. Co-authored-by: Copilot App <[email protected]> Copilot-Session: b08c8c16-d069-4af1-a1b5-735487e9680b
roji
added a commit
that referenced
this pull request
Oct 15, 2026
…) (#3969) Adapt element conversion input and output nullability while preserving null guards. Backport the array and list regression tests; the inherited nullable-comparer query test is unavailable in EF8. Co-authored-by: Copilot App <[email protected]> Copilot-Session: cdf2d065-d9c8-4f52-85ea-379a40d76928
This was referenced Oct 16, 2026
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.
Containsover a non-nullable collection can throw when the compared property has a nullable value converter, such as anint[]parameter against anint?property converted to string.Adapt the element conversion lambda's input and output to the collection element types while preserving existing null handling. Add round-trip coverage for arrays and lists, and enable the existing inherited nullable-converter query test with SQL assertions instead of expecting an exception.
Fixes #3919