public void testUpdate2() {
EntityManager em = currentEntityManager();
startTx(em);
RuntimeTest1 run = em.find(RuntimeTest1.class, 1);
assertNotNull(run);
assertEquals("runt1", run.getStringField());
assertNotNull(run.getSelfOneOne());
String ejbqlUpdate = "UPDATE RuntimeTest1 x " +
"SET x.stringField = :strngfld " +
"WHERE x.stringField = :field " +
"AND x.selfOneOne " +
"IS NOT NULL";
int upEntities = em.createQuery(ejbqlUpdate)
.setParameter("strngfld", "upd")
.setParameter("field", "runt1")
.executeUpdate();
assertEquals(1, upEntities);
RuntimeTest1 inst = em.find(RuntimeTest1.class, 1);
em.refresh(inst);
assertNotNull(inst);
// assertEquals("upd", inst.getStringField());