I am fairly new to neo4j coming from a relational data background. I'm having issues creating a spring service to interact with my neo4j database.
In my database I have a node 'type' / label called Row
which has a hierarchical parent child relationship to another Row
node
I defined my relationship like the following:
MATCH
(parent:Row),
(child:Row)
WHERE
child.parentUuid = parent.uuid
CREATE (parent)-[:ParentChild]->(child)
In Spring, my Row Entity's relationship is defined as:
@Node
data class Row(
//fields
@Relationship(type = "ParentChild", direction = Direction.OUTGOING)
var children: List<Row> = emptyList(),
) {}
My relationships appear to be working correctly when I run a cypher query directly on my database, but when I run Spring's built in findByFieldTitle
it throws an error and says the relationships don't match up.
Does anybody know what I'm doing wrong?