Database Reference
In-Depth Information
import org.springframework.data.neo4j.annotation.*;
@NodeEntity
public class Movie {
@GraphId
private Long graphId;
@Indexed ( unique=true )
private String id;
private String title;
private int year;
//Define getters and setters for all properties.
}
7. Now we will define another POJO that will define the relationship between Artist
and Movie. Let's create
org.neo4j.spring.samples.domain.Role.java as follows:
package org.neo4j.spring.samples.domain;
import org.springframework.data.neo4j.annotation.*;
@RelationshipEntity(type="ACTED_IN")
public class Role {
@GraphId
private Long graphId;
@StartNode
Private Artist artist;
@EndNode
private Movie movie;
private String role_name;
//Default No Argument Constructor
public Role(){}
//Argument constructor to set the properties
Search WWH ::




Custom Search