// Persist Parent+Child (1-1 relation) to old storage version
PersistenceManagerFactory oldPMF = JDOHelper.getPersistenceManagerFactory("originalStorageVersion");
PersistenceManager oldPM = oldPMF.getPersistenceManager();
MigratorOneToOneParent p = new MigratorOneToOneParent();
p.setName("First Parent");
MigratorOneToOneChild c = new MigratorOneToOneChild();
c.setName("Child 1");
p.setChild(c);
beginTxn();
oldPM.makePersistent(p);
commitTxn();
ObjectIdentity pId = (ObjectIdentity)oldPM.getObjectId(p);