-
-
Save szabi/e57f23d76b885d604a36 to your computer and use it in GitHub Desktop.
neo4django warning: expected behaviour?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from neo4django.db import models | |
class Person(models.NodeModel): | |
name = models.StringProperty() | |
born = models.DateTimeProperty() | |
died = models.DateTimeProperty() | |
sex = models.StringProperty() | |
friends = models.Relationship('self',rel_type='friends_with') | |
#-------- | |
class Evidence(models.NodeModel): | |
id = models.IntegerProperty() | |
name = models.StringProperty() | |
as_of = models.DateTimeProperty() | |
families = models.Relationship('Family',rel_type='FAMILY',related_name='evidence') | |
persons = models.Relationship('Person',rel_type='PERSON',related_name='evidence') | |
next = models.Relationship('Evidence',rel_type='NEXT',related_name='prev') | |
class Family(models.NodeModel): | |
status = models.StringProperty() # married, etc. | |
spouses = models.Relationship('Person',rel_type='SPOUSE',related_name='families') | |
children = models.Relationship('Person',rel_type='CHILD',related_name='families') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure why I get this warning; it might well be that I do not completely comprehend the
related_name
concept, but I thought having differentrel_types
would make the above model not ambiguous/conflicting...I get the following warnings in neo4django: