PersistenceManager pm = pmf.getPersistenceManager();
pm.currentTransaction().begin();
G g = new G("g1_testA");
Collection hs = g.getHs();
for(int i=0; i<NBOBJ; i++) {
H h = new H("hid_" + i);
h.setH1("h1_testA");
hs.add(h);
}
pm.makePersistent(g);
g = null;
hs = null;
pm.currentTransaction().commit();
pm.evictAll();
pm.close();
pm = pmf.getPersistenceManager();
pm.evictAll();
pm.currentTransaction().begin();
H h0 = (H) pm.getObjectById(pm.newObjectIdInstance(H.class, "hid_0"), false);
assertNotNull("Null h0", h0);
g = h0.getG();
assertNotNull("Null g", g);
pm.deletePersistentAll(g.getHs());
pm.deletePersistent(g);
pm.currentTransaction().commit();
pm.close();