3.7 · Lesson

Relationship Properties

Last lesson, you mapped the ACTED_IN 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. from the graph to the actors field in the Movie class. Now you will map the relationship's Full definition for property (opens in a new tab)A named value stored on a node or a relationship. role by creating a separate Role class to contain the field.

  1. Create a new class called Role.java in the src/main/java/com/example/appspringdata package.
  2. Import RelationshipId, RelationshipProperties, and TargetNode classes.