CypherSyntaxError:The old parameter syntax `{param}` is no longer supported. Please use `$param` instead. in noemodel v4.0.1 not in neo4j v4.1

1.8k views Asked by At

This issue is resolved in neo4j v4.1 update. But my question is related to neomodel v4.0.1. How do we resolve this issue in neomodel v4.0.1.

My queries: I have models.py as

from neomodel import StructuredNode, StringProperty, UniqueIdProperty()

class Person(StructuredNode):
  person_id = UniqueIdProperty()
  person_name = StringProperty()

when i execute

python manage.py install_labels it works fine with no errors

$ python manage.py install_labels
Setting up indexes and constraints...

Found django_neomodel.DjangoNode
 ! Skipping class django_neomodel.DjangoNode is abstract
Found neo4japp.models.Person
 + Creating unique constraint for person_id on label Person for class neo4japp.models.Person

Finished 2 classes.

But when I create its object like

modiji = Person(person_id='1', person_name='modiji').save()

it gives me this error

CypherSyntaxError: The old parameter syntax `{param}` is no longer supported. Please use `$param` instead (line 1, column 18 (offset: 17)) "CREATE (n:Person {create_params}) RETURN n"

As in OGM we can't manipulate cypher queries - how do I make it work? Please help.

I want to make use of OGM and don't want to hard code cypher queries to make my code effectively using django framework & neomodel.

If not then what is the alternative to neomodel to use OGM queries like the one in ORM so as to ease the database querying stuff?

0

There are 0 answers