Mapping Neo4j Object Types
iFull definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties. and iFull 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.
Join GraphAcademy to keep learning
Create your account to unlock 80+ hours of hands-on Neo4j courses, track your progress, and earn a certificate when you complete the course.
Sign in or register