Skip to content

WHERE expr IN (...) Broken for empty list #3105

@hacker112

Description

@hacker112

Worked in: 2.0.0rc8
Broken in: 2.0.0, 2.0.1

// Note that list is empty
var list = [];
model.findAll(... {where: {col: list}})...

produces in 2.0.0rc8 with MySQL:

`Model`.`col` IN (NULL)

produces in 2.0.0-2.0.1 with MySQL:

`Model`.`col` IN ()

Which breaks the MySQL-syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionFor issues and PRs. A bug that does not happen in an earlier version of Sequelize.type: bugDEPRECATED: replace with the "bug" issue type

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions