I am following this tutorial to access neo4j db using python. According to this tutorial I have created 2 relations among 4 nodes. The code is given below
alice, bob, rel = graph_db.create(
{"name": "Alice"}, {"name": "Bob"},
(0, "KNOWS", 1))
dev, carol, rel = graph_db.create(
{"name": "Dev"}, {"name": "Carol Smith"},
(0, "KNOWS", 1))
How can I create relation between alice and carol without creating new node?
Following code snippet is given in that tutorial to create relation between existing node. Not sure how to use how to use this in above case.
ref_node = graph_db.get_reference_node()
alice, rel = graph_db.create(
{"name": "Alice"}, (ref_node, "PERSON", 0))
When I try to execute
ref_node = graph_db.get_reference_node()
I get the following error.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'GraphDatabaseService' object has no attribute 'get_reference_node'
Any suggestion to solve this issue?