"id", "property1"
}, new Object[] {
1, "XXX"
});
SimpleEntity e1 = new SimpleEntity();
e1.setProperty1("YYY");
e1.updateIdField(1);
// detailed merge logic is described in chapter 3.2.4.1
Object merged = getEntityManager().merge(e1);
assertNotNull(merged);
assertTrue(merged instanceof SimpleEntity);
SimpleEntity e2 = (SimpleEntity) merged;
assertEquals("YYY", e2.getProperty1());
getEntityManager().getTransaction().commit();
assertEquals(1, getDbHelper().getRowCount("SimpleEntity"));
assertEquals("YYY", getDbHelper().getObject("SimpleEntity", "property1"));
}