Andre Soares
Andre Soares

Reputation: 79

Neo4j recursion in Java classes

I am developing a project using relational and non relational database. I would like to know if there is recursion to create the nodes in Neo4j. The backend is developed in Java and I did not find any information that could help me. I need this recursion in the non relational bank. Example of recursion

Upvotes: 0

Views: 76

Answers (1)

Tom Geudens
Tom Geudens

Reputation: 2656

Yes you can have a node have a relationship to itself :

CREATE (p:Person {name:"Tom"})
CREATE (p)-[:LIKES]->(p)

Upvotes: 1

Related Questions