mCustom neo4django与属性的关系不删除对象

mCustom neo4django与属性的关系不删除对象,django,graph,neo4j,Django,Graph,Neo4j,Am使用neo4j 1.9.4、django 1.5和neo4django 1.8(最近从github克隆) 我有这个: FRIENDSHIP_REQUESTS_RELATIONS_TYPE = 'wants_to_be_friend_of' sended_friendship_requests = models.Relationship('self', rel_type=FRIENDSHIP_REQUESTS_RELATIONS_TYPE, related_single=True) 在同一模

Am使用neo4j 1.9.4、django 1.5和neo4django 1.8(最近从github克隆)

我有这个:

FRIENDSHIP_REQUESTS_RELATIONS_TYPE = 'wants_to_be_friend_of'
sended_friendship_requests = models.Relationship('self', rel_type=FRIENDSHIP_REQUESTS_RELATIONS_TYPE, related_single=True)
在同一模型类的方法中的一段代码中:

self.node.relationships.create(self.FRIENDSHIP_REQUESTS_RELATIONS_TYPE, target_profile.node, status = self.NEW, created_at=timezone.now(), msg=msg)
这里唯一一件有点“罕见”的事情是访问neo4j rest客户机,以提供Matt Luongo在其回答中建议的关系上的物业

然后当我尝试时:

 profile.sended_friendship_requests.remove(self)
什么也没发生。没有错误,没有警告,但关系保持不变。就个人而言,我不认为这与此有关,因为我正在使用的neo4django版本已经修复了它。我怀疑我将不得不在orden中再次访问neo4j rest客户端以删除关系,但我对几乎所有这些技术都是新手,不知道如何继续

我一直在从/usr/local/lib/python2.7/dist-packages/neo4django-0.1.8-py2.7.egg/neo4django/db/models/relationships.py跟踪RelationshipInstance类中的remove方法,一切都很顺利。该方法以我假设的设计方式完全运行,但我想知道这里会发生什么。最后,该方法只需执行以下操作:

...
    self._removed.append(candidate_rels.pop(0))
...
self._remove_from_cache(obj)

显然,这是你所需要的一切,以消除关系,但对我来说,这是行不通的。我需要一些帮助

新手犯了错误。已解决添加: profile.save()

我真丢脸