I create a relationship as the following in Neo4php
$src->relateTo($dst, 'FRIENDS')
->setProperty('duration', '5')
->save();
I want the relationship be undirected not directed. If I am not wrong we can do this in Cypher
create n-[:FRIENDS]-m
vs
create n-[:FRIENDS]->m
How about in Neo4jphp? Can we set "relateTo" to a bi-directional relationship?
Neo4j does not support undirected relationships. What you are asking for is impossible. Why do you want undirected relationships? If the direction doesn't make sense for your domain, just pick a direction arbitrarily and ignore it when traversing or querying.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With