⛖ How to Create the bidirectional Relationships!?

I tried to create bidirectional relationships by using this pattern (a)-[:]-(b) and also this one (a)<-[:]->(b).
but at the end result is direct to one part of the nodes from the first parenthesis to last one (a)-[:]->(b) any suggestion?

Neo4j cannot store bidirectional relationships. No way around this, you can however treat relationships as bidirectional when querying your graph.



what you wrote means that this tutorial is wrong ?

Looks like the tutorial is just fine:

As Neo4j follows Property Graph Data Model, it should support only directional relationships. If we try to create a Relationship without any direction, then Neo4j DB server should throw an error

So you can only store directional relationships. But nothing stops you by omitting the direction of relationship when you are doing a MATCH statement.

1 Like