Conversation
[TML-1923](https://linear.app/prisma-company/issue/TML-1923/investigate-and-fix-push-regression) Fixes #29212 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Added a new functional test suite covering the array-push regression across supported database providers. * **Chores** * Bumped Prisma engines and related package versions to 7.5.0-10 across multiple packages. * **Refactor** * Normalized error field naming in the runtime to a consistent camelCase property for validation errors. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Prismo <prismabots@gmail.com>
[TML-1868](https://linear.app/prisma-company/issue/TML-1868/fix-mysql-bigint-relation-issue) Adds support for a new `canAssumeStrictEquality` flag used for in-memory joins. When it's set to false, we infer the type of the key present on the parent rows and inject casts for children rows. Fixes some MySQL edge cases. Fixes #29122 Engine PR: prisma/prisma-engines#5785 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved join key matching with optional per-field value mapping/type casting and a new flag to control strict-equality assumptions. * Standardized validation error identifiers to camelCase for more consistent error reporting. * **Tests** * Added MySQL-only functional tests for view relations with large BigInt keys. * **Chores** * Updated internal engine/tooling version references. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Prismo <prismabots@gmail.com>
[TML-1946](https://linear.app/prisma-company/issue/TML-1946/investigate-and-fix-null-cursor-regression) Fixes a bug where the query interpreter would unintentionally mutate the query plan. I've marked all of the query plan bits as readonly in the query interpreter to prevent similar issues. Fixes #29254 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Added functional tests, a test matrix and a dynamic schema to cover query-plan cache mutation and paging scenarios. * **Refactor** * Enforced immutability across the query runtime and rendering pipeline by using DeepReadonly/DeepUnreadonly and safer cloning where needed. * Introduced deep readonly/unreadonly type utilities. * **Bug Fixes** * Made parameter and field collections readonly in public signatures to prevent accidental mutations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Fixes #29267 ## Problem `Uint8Array` values nested inside objects or arrays are serialized as numeric-keyed objects (e.g. `{"0":72,"1":101,"2":108,"3":108,"4":111}`) instead of base64 strings when stored in a `Json` field. Top-level `Uint8Array` values are unaffected. This was introduced in #29182, which added `deserializeJsonObject()` before `JSON.stringify()` in the parameterization step to fix Date handling in Json fields. `deserializeJsonObject` correctly converts `{ $type: 'Bytes', value: 'SGVsbG8=' }` back to a `Uint8Array`, but `JSON.stringify` cannot natively serialize `Uint8Array` and falls back to `{"0":72,...}`. ## Fix Replace `JSON.stringify` with `safeJsonStringify` (already exported from `@prisma/client-engine-runtime`) in both the `#handleArray` and `#handleObject` methods of `Parameterizer`. `safeJsonStringify` uses a custom replacer that converts `ArrayBuffer.isView` values to base64 strings and `BigInt` to string representation. ## Tests Added a functional regression test in `packages/client/tests/functional/issues/29267-uint8array-in-json/` covering: - `Uint8Array` nested inside an object - `Uint8Array` nested inside an array - `Uint8Array` passed directly (already working, included for completeness) - Deeply nested `Uint8Array` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Bug Fixes** * Improved JSON serialization for parameter handling to properly convert Uint8Array values to base64 strings when stored in JSON fields, ensuring correct data handling across create operations. * **Tests** * Added comprehensive test coverage for Uint8Array serialization in JSON fields, including scenarios with nested objects, arrays, and various nesting depths across multiple database providers. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )