An OGM (Object Graph Mapper) maps nodes and relationships in the graph to objects and references in a domain model. Object instances are mapped to nodes while object references are mapped using relationships, or serialized to properties. JVM primitives are mapped to node or relationship properties. An OGM abstracts the database and provides a convenient way to persist your domain model in the graph and query it without using low level drivers. It also provides the flexibility to the developer to supply custom queries where the queries generated by Neo4j-OGM are insufficient.
Developing Java Business Applications often requires mapping rich domain models to your database. The Neo4j-OGM library is a pure Java library that can persist (annotated) domain objects using Neo4j. It uses Cypher statements to handle those operations in Neo4j.
Neo4j-OGM supports tracking changes to minimize necessary updates and transitive persistence (reading and updating neighborhoods of an object).
The connection to Neo4j handled by a transport layer is based on the Bolt protocol and uses the Neo4j Java Driver.
At a high level, here is what has changed in this third major version of Neo4j-OGM :
The minimum required versions are Java 17 and Neo4j 5.x.
Removal of Auto Index Manager
The Auto Index Manager that was responsible for creating indexes and constraints out-of-the-box got removed from the Neo4j-OGM.
Although the functionality was removed, the interfaces are still available. Those are currently in place to avoid refactoring your codebase and support Neo4j-Migrations' annotation processor to make the transition easier.
Removal of HTTP and embedded transport support
Since Neo4j 4.x Neo4j-OGM did not offer embedded transport but the module was still available for users connecting to a 3.5.x instance. Because the baseline of the official supported database was raised to Neo4j 5.x with this release, the embedded option got deprecated.
The HTTP transport mode was removed because it was rarely used and could not compete with the broad feature set that Bolt allows you to have.
If you encounter issues, or you are just looking for advice, feel free to use one of the links below:
The jumping off ground for learning about Neo4j is neo4j.com. Here is a list of other useful resources:
The Neo4j documentation introduces Neo4j and contains links to getting started guides, reference documentation and tutorials.
Neo4j Java Bolt Driver.
Was this page helpful?