问题描述
我正在尝试在 Neomodel 中在运行时创建关系。假设我有一个没有关系的 Person 模型:
class Person(Structurednode):
forename = Stringproperty()
surname = Stringproperty()
在运行时,人与人之间会有很多关系,这些关系会动态地输入。我想我可以执行以下操作来在运行时动态添加关系。
for relationship in dynamic_relationships: #dynamic_relationships is a list
r = RelationshipTo('Person',relationship) #error appears here
person1.r.connect(person2)
然而,标记的行得到一个 ValueError: call stack is not deep enough
我不确定我做错了什么。我什至可以在 Neomodel 中在运行时声明关系吗?还是我必须改用 Cypher?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)