我在 neomodel 中有 neo4j 节点和关系模式,如下所示。现在我需要创建一个函数,以便它获取 PersonRel 的 uid 并删除通过此关系连接的两个人之间的关系。我在文档中找不到它:https ://neomodel.readthedocs.io/en/latest/
class PersonRel(StructuredRel):
uid = StringProperty()
created_at = DateTimeProperty(
default=lambda: datetime.now(pytz.utc)
)
weight = FloatProperty()
direction = StringProperty()
class PersonNode(StructuredNode):
uid = UniqueIdProperty()
label = StringProperty(required=True)
description = StringProperty()
related_to = RelationshipFrom("PersonNode", "related_to", model=PersonRel)
created_at = DateTimeProperty(
default=lambda: datetime.now(pytz.utc)
)