endEm(pm);
}
public void testNullEmbeddedRelated() {
OpenJPAEntityManager pm = getPM();
AttachD d = (AttachD) pm.find(AttachD.class, doid);
assertNotNull("d is null in testNullEmbeddedRelated", d);
d.getEmbeddedE().getEstr();
d = (AttachD) pm.detachCopy(d);
endEm(pm);
d.getEmbeddedE().setEstr(null);
pm = getPM();
startTx(pm);
AttachD d2 = (AttachD) pm.merge(d);
assertNull("d2.getEmbeddedE().getEstr() is not null",
d2.getEmbeddedE().getEstr());
assertEquals("d2.getEmbeddedE().getEint() is not equal to 5", 5,
d2.getEmbeddedE().getEint());
endTx(pm);
endEm(pm);
pm = getPM();
d2 = (AttachD) pm.find(AttachD.class, doid);
assertNull("d2.getEmbeddedE().getEstr() is not null",
d2.getEmbeddedE().getEstr());
assertEquals("d2.getEmbeddedE().getEint() is not 5", 5,
d2.getEmbeddedE().getEint());
endEm(pm);
}