mirror of https://github.com/apache/openjpa.git
clean up unit test
no need to call em.persist inside the loop on the same entity over again.
This commit is contained in:
parent
f1eee206a9
commit
2d3c6e6ee0
|
@ -135,9 +135,8 @@ public class TestNonPrimaryKeyQueryParameters extends SQLListenerTestCase {
|
||||||
LineItem item = new LineItem(String.valueOf(i), 10);
|
LineItem item = new LineItem(String.valueOf(i), 10);
|
||||||
item.setInvoice(invoice);
|
item.setInvoice(invoice);
|
||||||
invoice.getLineItems().add(item);
|
invoice.getLineItems().add(item);
|
||||||
em.persist(invoice);
|
|
||||||
}
|
}
|
||||||
em.flush();
|
em.persist(invoice);
|
||||||
tran.commit();
|
tran.commit();
|
||||||
em.close();
|
em.close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue