Assert.assertNotNull("null AMMB object", a);
Collection bs = a.getBs();
Assert.assertNotNull("null collection of BMMB", bs);
Iterator it = bs.iterator();
while(it.hasNext()) {
BMMB b = (BMMB) it.next();
Assert.assertNotNull("null element collection of BMMB", b);
logger.log(BasicLevel.DEBUG, "idb: " + b.getIdb());
it.remove();
b.getAs().remove(a);
pm.deletePersistent(b);
}
pm.deletePersistent(a);
pm.currentTransaction().commit();
pm.close();