testUpdateDependent(NEW_EM_START_END);
}
@SuppressWarnings("unchecked")
private void testUpdateDependent(StartEnd startEnd) throws Exception {
// create Child12
Child12 c12_0 = newChild12(startEnd, "A", null, 12, null, new Embedded1("Child12Embedded1(1)"));
Long c12_0Id = c12_0.getId();
Key c12_0key = KeyFactory.createKey(PARENT_KIND, c12_0Id);
// add a Child11Many to Child12
startEnd.start();
c12_0 = em.find(Child12.class, c12_0Id);
Assert.assertTrue(c12_0.getChild11Manys().isEmpty());
Assert.assertEquals("Child12Embedded1(1)",c12_0.getEmbedded1().getStr());
Child11Many c12m_0 = new Child11Many("Child12Embedded1(1)/Child11ManyStr(1)");
c12_0.getChild11Manys().add(c12m_0);
startEnd.end();
String c12m_0Id = c12m_0.getId();
// more objects to prove we update and delete the correct one
newChild12(startEnd, "B", null, 121, null, new Embedded1("Child12Embedded1(2)"), new Child11Many("Child12Embedded1(2)/Child11ManyStr(1)"));
Assert.assertEquals(2, countForKind(PARENT_KIND));
Assert.assertEquals(2, countForClass(Child11Many.class));
// check the key of Child11Many in the Entity