clean up unit test

no need to call em.persist inside the loop on the same entity over again.
This commit is contained in:
Mark Struberg 2021-01-15 13:11:31 +01:00
parent f1eee206a9
commit 2d3c6e6ee0
1 changed files with 1 additions and 2 deletions

View File

@ -135,9 +135,8 @@ public class TestNonPrimaryKeyQueryParameters extends SQLListenerTestCase {
LineItem item = new LineItem(String.valueOf(i), 10);
item.setInvoice(invoice);
invoice.getLineItems().add(item);
em.persist(invoice);
}
em.flush();
em.persist(invoice);
tran.commit();
em.close();
}