switchDatasource(PersistenceManagerFactoryName.nontransactional);
getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
testLongPkOneToManyBidirChildren(NEW_PM_START_END);
}
private void testLongPkOneToManyBidirChildren(StartEnd startEnd) {
HasLongPkOneToManyBidirChildrenJDO pojo = new HasLongPkOneToManyBidirChildrenJDO();
HasLongPkOneToManyBidirChildrenJDO.ChildA
a = new HasLongPkOneToManyBidirChildrenJDO.ChildA();
pojo.setChildAList(Utils.newArrayList(a));
startEnd.start();
pm.makePersistent(pojo);
startEnd.end();
startEnd.start();
pojo = pm.getObjectById(HasLongPkOneToManyBidirChildrenJDO.class, pojo.getId());
assertEquals(1, pojo.getChildAList().size());
assertEquals(pojo, pojo.getChildAList().get(0).getParent());
startEnd.end();
}