Hi,
I'm trying to get the node entity along with relationship using spring data. Relationship values are not being binded when I annotated with '@Relationship' tag.
For Ex., User has list of task linked through task_status. I would like to query the list of pending tasks(task_status).
/** In UserRepository.java **/
match(u:user {email : {0})-[rel:PENDING]-(t:task) return u, rel, t
User getPendingTasks(String email);
/** User Entity **/
@NodeEntity(label="user")
public class User {
private Long id;
private String email;
@Relationship(type = "PENDING")
private List<Task> tasks = new ArrayList<>();
...
}
/** Relationship Entity **/
@RelationshipEntity(type = "PENDING")
public class TaskStatus {
@Id
private Long id;
@Property
private String status;
@StartNode
private User user;
@EndNode
private Task task;
}
/** In Service **/
User user = userRepository.getPendingTasks(email);
return user.getTasks(); //Yields No data
Like JPA entity, will the associated relationship is not being bound??