Transaction tx = pm.currentTransaction();
try {
tx.begin();
for (int i = 0; i < 10; i++) {
// Product instances
pm.makePersistent(new Product("ABC" + i, "F" + i, i * 200.00, 2, publicationDate));
pm.makePersistent(new Product("DEF" + i, "E" + i, i * 200.00, 4, publicationDate));
pm.makePersistent(new Product("GHI" + i, "D" + i, i * 200.00, 6, publicationDate));
// Product of Store
Product product = new Product(productName,"A",100.0,1, publicationDate);
pm.makePersistent(product);
// Store instances
Store store = new Store();
store.getProducts().add(product);