2
我不知道爲什麼我會得到這個警告;這很可能是我沒有完全理解的概念related_name
,但我認爲有不同rel_types
將使上述模型也不含糊/衝突的......neo4django:意外(?)警告?
我得到neo4django以下警告:
>>> from evidences.models import *
/[...]/neo4django/db/models/relationships.py:180: UserWarning: `evidence` and `evidence` share a relationship type and direction. Is this what you meant to do?
% (r.name, name))
/[...]/neo4django/db/models/relationships.py:180: UserWarning: `families` and `families` share a relationship type and direction. Is this what you meant to do?
% (r.name, name))
,相關模型可以在這裏找到:https://gist.github.com/szabi/e57f23d76b885d604a36
我認爲既不關係型也不目標模式是relationsh之間共享ips與related_name
相同。
從git中使用Django 1.4,neo4django current。
任何想法?
哈!我檢查了「證據」警告,沒有發現衝突,也沒有注意檢查「家人」!你會設置一個單元測試來研究「證據」情況嗎? –
因此,我希望在Person中有一個對象'families',它基本上是一個傳入SPOUSE和CHILD(聯繫的另一端始終是'Family'的實例)的* union *。我如何實現這一目標?將創建一個自己的**經理**是正確的方式?其實,我需要有p.families.all()給所有家庭,並區分添加函數:p.families.addAsChildFam(..)與p.families.addAsSpouseFam(..),作爲.add在這樣一個「聯盟」經理是不明確的。 –
如果您願意幫我一個忙,並提出問題,我可以嘗試進一步研究證據。哎呀,如果你感到慷慨,我很樂意接受拉,特別是確認錯誤:) 我有一個類似的,有點奇怪的關係用例 - 讓我看看我的解決方案,看看它是否可泛化。客戶'經理'可能會成爲其中的一部分,但我有一種感覺,無論如何,這都會非常重要。希望我很快能爲你提供一個要點。 –