@NodeEntity
class A {
@Relationship(type = "INCLUDES", direction = Relationship.UNDIRECTED)
List<B> bs;
}
@NodeEntity
class B {}
class C {
int something;
}
@RelationshipEntity(type = "INCLUDES")
class R {
String property1;
int property2;
C c;
@StartNode
A a;
@EndNode
B b;
}
The goal to retrieve the relationship entity between two particular nodes (some instances of A
and B
) with ALL its properties.
I tried the following cypher query:
MATCH (a:A)-[i:INCLUDES]-(b:B) RETURN i;
However, this only gives me an empty result. If I retrieve all INCLUDE
relationship entities with the default Neo4jRepository.findAll()
implementation, I can see that all properties are set.
Thanks for any help!
Try this
MATCH (a:A)-[i:INCLUDES]-(b:B) RETURN i, a, b;