Skip to content

fix: give JsonContainsAny LIKE patterns a string type mapping The translator builds LIKE against a SQL fragment, which carries no type mapping, so neither the parameter nor the generated constant patterns got one. EF Core 9 tolerated that; EF Core 10 refuses to generate SQL ("Expression '@like' in the SQL tree does not have a type mapping assigned"), breaking every JsonContainsAny search on net10, including change-tracking search. Patterns and the escape constant now use the provider's default string mapping. The column's own mapping is not reused because it can carry a value converter (object <-> JSON) that would try to convert the pattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UvmzsCHKfHVMozvywp42FU - #445

Merged
JacobAtchley merged 1 commit into
mainfrom
forks/jatchley/fix-json-contains-type-mapping
Oct 8, 2026

Conversation

@JacobAtchley

Copy link
Copy Markdown
Collaborator

No description provided.

The translator builds LIKE against a SQL fragment, which carries no type
mapping, so neither the parameter nor the generated constant patterns got one.
EF Core 9 tolerated that; EF Core 10 refuses to generate SQL ("Expression
'@like' in the SQL tree does not have a type mapping assigned"), breaking every
JsonContainsAny search on net10, including change-tracking search.

Patterns and the escape constant now use the provider's default string
mapping. The column's own mapping is not reused because it can carry a value
converter (object <-> JSON) that would try to convert the pattern.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UvmzsCHKfHVMozvywp42FU
@JacobAtchley
JacobAtchley merged commit 7766570 into main Oct 8, 2026
1 check passed
@JacobAtchley
JacobAtchley deleted the forks/jatchley/fix-json-contains-type-mapping branch October 8, 2026 19:37
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.

1 participant