Skip to content

Buffer and Array parameters are not passed correctly to the DB clients when invalidWhereValuesBehavior is enabled #12574

Closed

Description

@alumni

Issue description

Any Buffer parameter is incorrectly copied and passed to DB client as a plain object instead of a Buffer value.

Expected Behavior

Buffer values should be passed correctly to the DB client.

Actual Behavior

The Buffer values are converted to a plain object, which most DB clients don't accept.

Steps to reproduce

export class UserEntry {
  @Column()
  guid: Buffer;
}

const guid = Buffer.from(crypto.randomUUID().replaceAll('-', ''), 'hex');

createQueryBuilder()
  .insert()
  .into(UserEntity)
  .values({ guid })
  .execute();

My Environment

Dependency Version
Operating System
Node.js version 24.16.0
Typescript version 5.9.x
TypeORM version 0.3.30

Additional Context

Introduced by #11878 in OrmUtils.normalizeWhereCriteria.

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • capacitor
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, and I know how to start.

Activity

  1. added
    backport
    on Jun 11, 2026
  2. added theissue type on Jun 11, 2026
  3. self-assigned this
    on Jun 11, 2026
  4. changed the title [-]Buffer parameters are not passed correctly to the driver[/-] [+]Buffer parameters are not passed correctly to the DB clients[/+] on Jun 11, 2026
  5. changed the title [-]Buffer parameters are not passed correctly to the DB clients[/-] [+]Buffer and Array parameters are not passed correctly to the DB clients when `invalidWhereValuesBehavior` is enabled[/+] on Jun 11, 2026
  6. removed
    backport
    on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions