Repository navigation
[9.0] Fix raw byte-array JSON SQL literals - #4042
Merged
Merged
Conversation
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 <[email protected]> Copilot-Session: 8f4697e4-2b37-4852-9697-8059fda1fca1
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.
Backports the applicable SQL-literal fix from #3935 (a8e7c1c).
Decode
byte[]mapped tojson/jsonbas 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/jsonbliteral generation (objects, apostrophe escaping, non-ASCII UTF-8, numeric arrays, and JSON null) and synchronous/asynchronous parameter-versus-constant equality in the existingJsonStringQueryTestfixture. 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