Skip to content

[9.0] Fix raw byte-array JSON SQL literals - #4042

Merged
roji merged 1 commit into
hotfix/9.0.5from
roji-json-bytes-9-0-backport
Oct 19, 2026
Merged

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

Conversation

@roji

@roji roji commented Oct 19, 2026

Copy link
Copy Markdown
Member

Backports the applicable SQL-literal fix from #3935 (a8e7c1c).

Decode byte[] mapped to json/jsonb as raw UTF-8 JSON when generating SQL literals instead of serializing the bytes as a base64 JSON string. EF 9.0 already selects the opaque JSON mapping correctly, so it needs only this SQL-literal fix, not the 10.0 collection-mapping regression fix.

Regression coverage includes json/jsonb literal generation (objects, apostrophe escaping, non-ASCII UTF-8, numeric arrays, and JSON null) and synchronous/asynchronous parameter-versus-constant equality in the existing JsonStringQueryTest fixture. No ad hoc fixture or newer test infrastructure is introduced.

Validation: both new mapping cases and both new PostgreSQL predicate cases failed before the production fix. Afterward, the type-mapping suite passed (155 passed, 6 skipped), and the JSON string/DOM query suites passed against PostgreSQL (56 passed).

Fixes #3698

Backport the SQL-literal fix from #3935. Decode raw JSON bytes as UTF-8 instead of serializing them as a base64 JSON string, with mapping and query regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8f4697e4-2b37-4852-9697-8059fda1fca1
@roji roji linked an issue Oct 19, 2026 that may be closed by this pull request
@roji
roji merged commit 84820a8 into hotfix/9.0.5 Oct 19, 2026
10 checks passed
@roji
roji deleted the roji-json-bytes-9-0-backport branch October 19, 2026 11:58
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.

byte[] can't be used anymore for jsonb columns

1 participant