1
我想在py2neo v3中創建兩個不同類型的現有節點之間的關係,只能使用Cypher執行或者是否有一個函數(可能合併)應該這樣做?在Py2neo上理解合併問題
E.g.
from py2neo import Graph, Path, authenticate, GraphObject
from py2neo import Node, Relationship
from py2neo.ogm import *
a = Node("type1",name = "alice")
graph.create(a)
b = Node("type2",name = "bob")
graph.create(b)
#now I want to make a relationship of these nodes without using a, b or Relationship
#Hence something like:
graph.merge(Node("type1",name = "alice"),"FRIENDS_WITH",Node("type2",name = "bob"))
的一點是,如果Alice有很多很多的朋友,我讓他們所有的時間提前,因爲他們在,我想已經環繞在字典其他各種性質和取得的節點,我怎麼接愛麗絲與那些朋友沒有創建額外的愛麗絲?我認爲合併會起作用,但我不明白它的語法。