2.5 · Lesson

Mapping Neo4j Object Types

Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties. and Full definition for relationship (opens in a new tab)A named, directed connection between two nodes. Every relationship has a type, a start node and an end node. are separate entities in the Neo4j database, and they are also mapped to separate classes in an application. Depending on your domain model, you will map the database entities to your application entities directly.

Remember the Spring Data Neo4j building blocks lesson? The Neo4j Template and Spring Data Repositories layers apply the domain. This means that the generic driver type classes will not be used (and their methods inaccessible) when using the Spring Repositories layer. Instead, objects coming from the database will be mapped to the domain object and their methods.