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有很多很多的朋友,我让他们所有的时间提前,因为他们在,我想已经环绕在字典其他各种性质和取得的节点,我怎么接爱丽丝与那些朋友没有创建额外的爱丽丝?我认为合并会起作用,但我不明白它的语法。