switchDatasource(PersistenceManagerFactoryName.nontransactional);
getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
testMultipleBidirChildren(NEW_PM_START_END);
}
private void testMultipleBidirChildren(StartEnd startEnd) {
HasMultipleBidirChildrenJDO pojo = new HasMultipleBidirChildrenJDO();
HasMultipleBidirChildrenJDO.BidirChild1 c1 = new HasMultipleBidirChildrenJDO.BidirChild1();
HasMultipleBidirChildrenJDO.BidirChild2 c2 = new HasMultipleBidirChildrenJDO.BidirChild2();
pojo.getChild1().add(c1);
pojo.getChild2().add(c2);
startEnd.start();
pm.makePersistent(pojo);
startEnd.end();
startEnd.start();
pojo = pm.getObjectById(HasMultipleBidirChildrenJDO.class, pojo.getId());
assertEquals(1, pojo.getChild1().size());
assertEquals(1, pojo.getChild2().size());
startEnd.end();
}