}
public void testUpdateIntDiscriminator_NoTxn() throws Exception {
testUpdateIntDiscriminator(NEW_EM_START_END);
}
private void testUpdateIntDiscriminator(StartEnd startEnd) throws Exception {
ParentIntDiscriminator p = new ParentIntDiscriminator();
p.setParentStr("ParentInt");
makePersistent(p, startEnd);
String pId = p.getId();
Key pKey = KeyFactory.stringToKey(pId);
Assert.assertEquals(PARENTINT_KIND, pKey.getKind());
Entity pe = ds.get(pKey);
Assert.assertEquals(pKey, pe.getKey());
Assert.assertEquals(1L, pe.getProperty("type"));
Assert.assertEquals("ParentInt", pe.getProperty("parentStr"));
Assert.assertEquals(2, pe.getProperties().size());
startEnd.start();
p = em.find(ParentIntDiscriminator.class, pId);
p.setParentStr("ParentInt(2)");
startEnd.end();
pe = ds.get(pKey);
Assert.assertEquals(pKey, pe.getKey());
Assert.assertEquals(1L, pe.getProperty("type"));
Assert.assertEquals("ParentInt(2)", pe.getProperty("parentStr"));
Assert.assertEquals(2, pe.getProperties().size());
startEnd.start();
p = em.find(ParentIntDiscriminator.class, pId);
Assert.assertEquals("ParentInt(2)", p.getParentStr());
startEnd.end();
Assert.assertEquals(1, countForKind(PARENTINT_KIND));
startEnd.start();