Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-20-2020 01:54 AM
Contrary to the documentation (https://neo4j.com/docs/cypher-manual/current/syntax/parameters/), the following command does not work in version 4.0 (4.0.0 Enterprise, local db in Neo4j Desktop):
CYPHER 3.5
MATCH (n:Person)
WHERE n.age > {agelimit}
RETURN n.name, n.age
The old parameter syntax {param}
is no longer supported. Please use $param
instead (line 3, column 15 (offset: 42)) "WHERE n.age > {agelimit}"
01-20-2020 01:56 AM
Parameters should be prefixed with $ in 4.0 instead of curly brackets. Just write $agelimit
instead of {agelimit}
01-20-2020 02:12 AM
Yes, sure. I was referring to the compatibility features in the documentation that say that the old syntax can be executed with that CYPHER 3.5
prefix. In that case the query should be executed with a warning, but there is the same error as trying it without that prefix.
see documentation: https://neo4j.com/docs/cypher-manual/current/deprecations-additions-removals-compatibility/#cypher-c...
Without the
CYPHER 3.5
prefix this query would fail with a syntax error. WithCYPHER 3.5
however, it will only generate a warning and still work.
01-22-2020 05:23 PM
There is a bug here that I believe will go out with the next patch release, which should again allow {}
type params to work as expected when using the CYPHER 3.5
prefix.
01-23-2020 12:26 AM
Ok, thanks for that information. Is this bug affecting the Cypher query prefixing only or also the Cypher version setting in the configuration file?
03-09-2020 04:38 PM
I believe it affected both. And the 4.0.1 patch should have fixed this, please let us know if you are still running into problems here.
05-16-2020 08:15 PM
I am using Neo4j 4.0.3 with Neo4j Desktop Neo4j 1.2.7. I am getting this same error while using ORM/OGMs like neomodel or py2neo
py2neo.database.ClientError: SyntaxError: The old parameter syntax {param}
is no longer supported. Please use $param
instead (line 1, column 45 (offset: 44))
"MATCH (_:CommConfig) WHERE _.BaseConfigId = {1} RETURN _"
05-17-2020 09:21 AM
Unless you're using the CYPHER 3.5 prefix, this is likely only a tangentially related question.
You may want to check to see if you're using the right versions of your ORM/OGM libraries, they would need to be new enough to work with Neo4j 4.0.x. Likely you're using older versions that have not yet changed the syntax of their emitted Cypher.
All the sessions of the conference are now available online