BatchTestRunner.run(DetachAttach.class);
}
/** */
public void testAttachDirty() {
Cart detachedCart = createDetachedInstance(ASSERTION_FAILED);
pm.currentTransaction().begin();
cartEntry1.setQuantity(500);
goldenCartEntry.setQuantity(500);
Cart attachedCart = (Cart)pm.makePersistent(detachedCart);
checkCartValues(ASSERTION_FAILED +
"after attach," + NL, attachedCart, true);
pm.currentTransaction().commit();
pm.currentTransaction().begin();
Cart persistentCart = (Cart)pm.getObjectById(cart1oid);
checkCartValues(ASSERTION_FAILED +
"after attach, commit, begin, getObjectById," + NL,
persistentCart, true);
pm.currentTransaction().commit();
failOnError();