mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#455 - Should not generate "FOR UPDATE" for delete query
This commit is contained in:
@@ -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() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user