#1996 - Fix for MySQLSyntaxErrorException when update in bulk using idIn().

This commit is contained in:
rob bygrave
2020-04-30 21:33:02 +12:00
parent ed0e9e7006
commit dbe473d5a1
3 changed files with 10 additions and 15 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ public class UpdateQueryTest extends BaseTestCase {
int rows = server().find(Customer.class)
.where()
.in("id", 1000, 1001, 1002)
.idIn(1000, 1001, 1002)
.asUpdate()
.setRaw("status = ?", "A")
.setLabel("asUpdateByIds")
@@ -116,7 +116,7 @@ public class UpdateQueryTest extends BaseTestCase {
assertThat(sql).hasSize(1);
assertThat(rows).isEqualTo(0);
assertSql(sql.get(0)).contains("update o_customer set status = ? where id in (?,?,?)");
assertSql(sql.get(0)).contains("update o_customer set status = ? where id in (?,?,?,?,?)"); // bind padding to 5
}
@Test