NucleusContext nucCtx = ((JDOPersistenceManagerFactory)pmf).getNucleusContext(); // For JDO // NucleusContext nucCtx = ((JPAEntityManagerFactory)emf).getNucleusContext(); // For JPA Migrator migrator = new Migrator(nucCtx); migrator.migrate(entity, MyEntity.class);The second (alternative) method is for a bulk migration of a Collection of Entities of a type.
NucleusContext nucCtx = ((JDOPersistenceManagerFactory)pmf).getNucleusContext(); // For JDO // NucleusContext nucCtx = ((JPAEntityManagerFactory)emf).getNucleusContext(); // For JPA Migrator.migrate(nucCtx, MyEntity.class, entityIter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|