sideB1.setName("yar");
beginTxn();
pm.makePersistent(sideB1);
commitTxn();
HasOneToOneWithKey withKey = new HasOneToOneWithKey();
withKey.setOther(KeyFactory.createKey("UnownedUpgradeJDO$SideB", sideB1.getId()));
beginTxn();
pm.makePersistent(withKey);
commitTxn();
beginTxn();
assertNotNull(pm.getObjectById(HasOneToOneWithKey.class, withKey.getId()).getOther());
commitTxn();
// Read back in using latest storage version, as unowned
Map<String, String> props = Utils.newHashMap();
props.put("datanucleus.appengine.datastoreEnableXGTransactions", Boolean.TRUE.toString());
switchDatasource(PersistenceManagerFactoryName.transactional, props);
beginTxn();
HasOneToOneWithUnowned withUnowned = pm.getObjectById(HasOneToOneWithUnowned.class, withKey.getId());
assertNotNull(withUnowned.getOther());
assertEquals(sideB1.getId(), withUnowned.getOther().getId());
commitTxn();
}