-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Description
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
I found this in toSql() function:
case "in":
if ((connection.driver instanceof OracleDriver) && parameters.length === 0) {
return `${aliasPath} IN (null)`;
}
return `${aliasPath} IN (${parameters.join(", ")})`;But when In() function (with mysql) get empty array, also insert wrong sql, so it should be like this:
case "in":
if ((connection.driver instanceof OracleDriver || connection.driver instanceof MysqlDriver) && parameters.length === 0) {
return `${aliasPath} IN (null)`;
}
return `${aliasPath} IN (${parameters.join(", ")})`;Metadata
Metadata
Assignees
Labels
No labels