[英]SDN4 - Neo4j 3.0.6 - neo4j-ogm 2.0.5 : Cannot fetch when findByPropertyParentId
我有两个具有MN关系的课程,其中一个具有父级课程。 问题是,当我调用leftRightRepository.findByLeftParentId(id)时,我想返回对象列表,但是它总是返回一个空列表。
@NodeEntity
public class Right{
@GraphId
Long graphId;
String id; //random generated UUID
String name;
//Properties & Constructor
}
@NodeEntity
public class Left{
@GraphId
Long graphId;
String id; //random generated UUID
String name;
ParentClass parent;
//Properties & Constructor
}
@NodeEntity
public class ParentClass{
@GraphId
Long graphId;
String id; //random generated UUID
String name;
//Properties & Constructor
}
@NodeEntity
public class LeftRight {
@GraphId
Long graphId;
String id;
@Relationship(type = "LEFTRIGHT_LEFT", direction = "OUTGOING")
private Left left;
@Relationship(type = "LEFTRIGHT_RIGHT", direction = "OUTGOING")
private Right right;
//Properties & Constructor
}
当我使用findAll()检查并查看该属性时,它具有正确的父ID。 是虫子吗? 在SDN3中,它可以工作,但在SDN4中,我不能再次使用它。
我尝试使用findByLeftId(List ID)解决一些代码。 在SDN3中,它也可以工作,但在SDN4中,它不能再工作。
SDN 4 / Neo4j OGM目前仅支持一层嵌套。 您要执行的取景器是两个嵌套层次: LeftRight
- > left
- > parent
现在唯一的选择是自定义@Query。
也许您也可以在此处记录功能请求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.