Skip to content

Commit

Permalink
fix delete contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
nPraml committed Nov 5, 2024
1 parent 5522711 commit 2cc5c64
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public void batchFlush() {

for (int i = 0; i < 3; i++) {
Customer customer = ResetBasicData.createCustomer("BatchFlushPreInsert " + i, null, null, 3);
customer.addContact(new Contact("Fred" + i, "Blue"));
customer.addContact(new Contact("BatchFlush" + i, "Blue"));
customers.add(customer);
}

for (int i = 3; i < 6; i++) {
Customer customer = ResetBasicData.createCustomer("BatchFlushPostInsert " + i, null, null, 3);
customer.addContact(new Contact("Fred" + i, "Blue"));
customer.addContact(new Contact("BatchFlush" + i, "Blue"));
customers.add(customer);
}

Expand All @@ -57,7 +57,7 @@ public void batchFlush() {
txn.commit();
} finally {
DB.find(Customer.class).where().startsWith("name", "BatchFlush").delete();
DB.find(Contact.class).where().startsWith("firstName", "Fred").startsWith("lastName", "Blue").delete();
DB.find(Contact.class).where().startsWith("firstName", "BatchFlush").startsWith("lastName", "Blue").delete();
}
}

Expand Down

0 comments on commit 2cc5c64

Please sign in to comment.