beginTxn();
pm.makePersistent(sideB2);
commitTxn();
HasOneToManyWithKey withKey = new HasOneToManyWithKey();
withKey.addOther(KeyFactory.createKey("UnownedUpgradeJDO$SideB", sideB1.getId()));
withKey.addOther(KeyFactory.createKey("UnownedUpgradeJDO$SideB", sideB2.getId()));
beginTxn();
pm.makePersistent(withKey);
commitTxn();