Is it possible to connect a JPA implementation to a Neo4j specific version?

119 views Asked by At

I have a Java project that use an embedded Neo4j database (NoSQL), version 2.0.0.

I need to migrate this data for a traditional relational db (SQL). For this job, I thought that using an implementation of JPA could help.

I found these three projects:

  • Hibernate OGM
  • DataNucleus
  • Kundera

But I can't find a JPA implementation compatible with Neo4j 2.0.0 version. Kundera only supports Neo4j 1.8.1. Each distribution of Hibernate OGM brings with its own Neo4j version (ogm-neo4j-4.2.0 brings neo4j-2.1.8 and ogm-neo4j-4.1.2 brings neo4j-2.1.6). The same seems to happen with DataNucleus, with differents version numbers.

Is there any way I can find a JPA implementation compatible with the Neo4j 2.0.0 specific version? Or I'm fighting against windmills and I have to updagrade my Neo4j version?

1

There are 1 answers

2
Neil Stockton On BEST ANSWER

I have a sample app I've been playing with for a while, and was using DataNucleus v4.1 with the Neo4j it pulls in by default (2.1.3 IIRC). I just tried it with v2.0.0 and all runs fine for me. Just put the version of neo4j you want in the CLASSPATH and, if necessary, exclude the one that may be pulled in from the DataNucleus pom (if using Maven). The Neo4j API seems about the same between v2.0 and v2.1 so no real reason why it wouldn't.