FYI, DataNucleus JDO/JPA now has a prototype plugin for persisting normal
Java objects to Neo4J; it already supported persistence to RDBMS, ODBMS,
XML, JSON, Excel, ODF, MongoDB, HBase, AppEngine, VMForce, Cassandra, LDAP
and others so supporting some of the nice graph databases like Neo4J makes
a lot of sense.
To use this support you mark your model classes with JDO or JPA metadata
(annotations or XML) in the normal way you would for RDBMS (or any other
datastore), and write your JDO or JPA persistence code in the normal way.
The only difference is that the data is persisted into Neo4j transparently.
I've not had time to write up a tutorial yet, but the model and persistence
code would be identical to persisting to any other datastore, just that in
the definition of the datastore "URL" it would be something like
This plugin is not yet released, as such, but is available as a nightly
build for anyone wishing to give it a try.
What it currently supports :
- Each object of a class becomes a Node.
- Supports datastore identity, application identity, and nondurable
- Supports versioned objects
- Fields of all primitive and primitive wrappers can be persisted
- Fields of many other standard Java types can be persisted (Date, URL,
URI, Locale, Currency, JodaTime, javax.time, plus many more).
- 1-1, 1-N, M-N, N-1 relations are persisted as Relationships (doesn't
support Maps currently)
- JDOQL/JPQL queries can be performed, and the operators &&, ||, ==, !=,
>, >=, <, <= are processed using Cypher, with any remaining syntax handled
What is likely to be added (hopefully soon)
- Processing of more JDOQL/JPQL syntaxis in Cypher to minimise any
- Embedded fields (and querying of embedded fields)
- Check for duplicate object identity
- Support for using the (Neo4j-assigned) node "id" as a global unique
Feedback is welcome; go to
Would it be possible to get a link to it put on the Neo4j website or docs
in a convenient place?