Question

I have defined the parent class of Person, and a subclass of Father as following:

class Person(models.NodeModel):

    first_name = models.StringProperty()
    middle_name = models.StringProperty()
    last_name = models.StringProperty()

class Father (Person)

    Profession = models.StringProperty()

After creating a number of Fathers, I can easily get all of them by Father.objects.all(). However, by running the code Person.objects.all() nothing is found (i.e. [])!

As far as I know the last query should return objects as well! Is there any solution?

Was it helpful?

Solution

Are you using neo4django?

If so, I believe this is fixed in master on GitHub. You can install from GitHub using pip- pip install -e git+https://github.com/scholrly/neo4django/#egg=neo4django. If it still isn't working, consider raising an issue and I'll see what I can do.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top