#455 - Should not generate "FOR UPDATE" for delete query

This commit is contained in:
Robin Bygrave
2015-11-30 16:50:26 +13:00
parent fae39fe650
commit 579812d717
2 changed files with 16 additions and 0 deletions
@@ -51,6 +51,21 @@ public class TestDeleteByQuery extends BaseTestCase {
assertThat(list).isEmpty();
}
@Test
public void testWithForUpdate() {
EbeanServer server = Ebean.getDefaultServer();
if (server.getName().equals("mysql")) {
// MySql does not the sub query selecting from the delete table
return;
}
server.find(Customer.class)
.where().eq("name","FatsDomino")
.query().setForUpdate(true)
.delete();
}
@Test
public void testCommit() {