migration path from JPA / Hibernate

#1

Hi.

Is there a conversion tool or documentation that is of help when migrating an existing JPA solution to ObjectDB?

Any recommendations or known pitfalls when it comes to ...

 

  • converting persistence units (persistence.xml)
  • unsupported features / annotations in ObjectDB that need special attention when using Entities previously geared towards JPA / Hibernate
  • migrating data from existing relational databases in use with JPA / Hibernate like e.g. H2 ?

 

Regards.

Jörg

 

#2

Hi,

Only a few JPA 2 features are not supported yet by ObjectDB (but expected to be supported soon). See the issue tracking  system (access requires logging in to ObjectDB website) for exact details. Notice that the JPA 2 criteria query API is now fully supported (relevant documentation will be released in a few days).

If your application uses old Hibernate API / extensions (e.g. Session instead of EntityManager, queries with HQL syntax instead of JPQL, etc.) you will have to move to standard JPA code.

But if your application already uses standard JPA code - switching to ObjectDB might be straightforward. Just add objectdb.jar to the classpath and set ObjectDB as the provider in the persistence.xml file.

About the data, currently you will have to migrate it by yourself. This can be done by writing a small JPA program that retrieves entity objects from Hibernate, detaches them and then persists them using ObjectDB. A tool that can automate this process will probably be available in the future.

ObjectDB Support
#3

Thanks for the detailed answers!

> retrieves entity objects from Hibernate, detaches them and then persists them using ObjectDB. A tool that can > automate this process will probably be available in the future.

From this I conclude, that you already thought about such a tool, but I guess it is not on any roadmap yet, since you say "probably" ...

Anyways, let's see, perhaps we can come up with something decent ourselves ...

 

Regards.

 

Reply