mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
ADD: Failing test case
This commit is contained in:
@@ -7,6 +7,7 @@ import io.ebean.test.LoggedSql;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
@@ -233,6 +234,17 @@ public class TestDeleteByQuery extends BaseTestCase {
|
||||
|
||||
DB.save(contact);
|
||||
|
||||
// check if we can delete more than 2100 in a batch on SqlServer
|
||||
List<Contact> moreContacts = new ArrayList<>();
|
||||
for (int i = 0; i < 2200; i++) {
|
||||
Contact c = new Contact();
|
||||
c.setFirstName("DelByQueryFirstName");
|
||||
c.setLastName("deleteMe");
|
||||
c.setCustomer(all.get(0));
|
||||
moreContacts.add(c);
|
||||
}
|
||||
DB.saveAll(moreContacts);
|
||||
|
||||
DB.find(Contact.class).where().eq("firstName", "DelByQueryFirstName").delete();
|
||||
|
||||
Contact contactFind = DB.find(Contact.class, contact.getId());
|
||||
|
||||
Reference in New Issue
Block a user