I am trying to get all relationships using spring-data and neo4j.
My Repository
public interface RelationshipNeo4JRepository extends
GraphRepository<Relationship> {
}
Relationship Class:
@RelationshipEntity
public class Relationship {
@GraphId
Long nodeId;
@StartNode
private Node startNode;
@EndNode
private Node endNode;
@Indexed
@RelationshipType
private String type;
//getter setter
}
When I am trying to use findAll() method, I am not getting any relationships. but I am getting total using count(). Please help me using cypher query or some other way.