Nay*_*ish 5 neo4j spring-data-neo4j spring-data-neo4j-4 neo4j-ogm
使用新的Neo4j 2.3 OGM.当尝试通过id加载实体时,我遇到以下问题:
@NodeEntity
class Person {
Long id;
String name;
@Relationship(type="Friend", direction = Direction.OUTGOING)
public List<Person> friends;
}
Run Code Online (Sandbox Code Playgroud)
假设(1,"Alex")是(2,"Joseph")和(3,"Guy")的朋友.(4,"Nati")是(5,"Amit")的朋友,使用以下代码:
session.loadAll(Person.class,Arrays.toList(new Long(){1L,4L}),1)
应该返回2个Person对象,Alex包含两个朋友(Guy,Joseph)和Nati包含一个朋友,但它实际返回的是5个对象(Alex,Guy,Joseph,Nati,Amit).虽然Mike和Nati确实包含了他们的朋友,但是我通过两个id 请求Person并获得包含5的Iterable 似乎很奇怪(当然也不需要).有人知道为什么会这样吗?这是一个错误吗?
归档时间: |
|
查看次数: |
127 次 |
最近记录: |