Skip to content

v4.43.0 broke delete flag handling #10600

@PaddyMann

Description

@PaddyMann

What are you doing?

After upgrading to 4.43.0 (from 4.42.0), we can see the following SQL being produced:

UPDATE `Response` SET `deleted`='true',`updatedBy`=24751,`updatedAt`=NOW() WHERE `id` = 416695 AND `deleted` = 'false'

Note that deleted is being correctly to a string. This leads to the following error:

Error Code: 1292. Truncated incorrect DOUBLE value: 'false'

This code being used is:

await Response.update(
  {
    deleted: true,
  },
  {
    where: {id: existingResponse.id},
    ...context,
  }
);

The column is defined in the model as:

deleted: {
  type: DataTypes.TINYINT,
},

Reverting to 4.42.0 fixes the issue.

What do you expect to happen?

The latest version of Sequelize 4 should not convert my deleted booleans to strings.

What is actually happening?

The latest version of Sequelize 4 is converting my deleted booleans to strings.

Dialect: mysql
Database version: 5.7.23
Sequelize version: 4.43.0
Tested with latest release: Yes (of Sequelize 4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions