Question

First off I apologize if this issue has already been documented somewhere, but I've done a fair bit of hunting around and haven't found anything.

I have two classes:

class A(models.NodeModel):
    email = models.EmailProperty(indexed=True)

class B(models.NodeModel):
    owner = models.Relationship(A, rel_type='owns', related_name='songs')
    name = models.StringProperty()

I wish to return A's who own B's where B's name is "foo" using the query:

A.objects.filter(songs__name="foo")

But this raises a NotImplementedError: The name operator is not yet implemented.

What am I doing wrong? I can't seem to find any extensive documentation detailing how I can query relationships.

Any help would be very much appreciated!

Thanks

Was it helpful?

Solution

Okay, I managed to sort this out myself:

I was following this tutorial https://github.com/lukeorland/neo4django-tutorial (which massively helped - so a big thanks to Luke Orland for taking the time to put it together), which used the dev release of neo4django.

After delving into the source code a little further, I realised the code was very different to that found here: https://github.com/scholrly/neo4django.

Substituting the latest neo4django files for those of the dev release solved the problem!

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