mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1996 - Fix for MySQLSyntaxErrorException when update in bulk using idIn().
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user