Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-30-2019 06:03 AM
Hi, I'm using neo4j desktop with neo4j v3.5.5. I'm having some issues with a query. I copied the query that spring data logged to my console window and pasted it in the neo4j browser and it's giving an error.
MATCH (n:Person)
WHERE ID(n) = { id }
WITH n
RETURN n,[ [ (n)-[r_a1:ACTED_IN]->(m1:Movie) | [ r_a1, m1 ] ] ]
with params {id=4}
The error is:
Neo.ClientError.Statement.SyntaxError: Invalid input '=': expected an identifier character, whitespace, ':', ',' or '}' (line 6, column 16 (offset: 162)) "with params {id=4}"
This is the actual thing I copied from the console window:
2019-05-29 23:08:51.549 INFO 24592 --- [nio-8080-exec-4] o.n.o.drivers.bolt.request.BoltRequest : Request:
MATCH (n:`Person`)
WHERE ID(n) = { id }
WITH n
RETURN n,[ [ (n)-[r_a1:`ACTED_IN`]->(m1:`Movie`) | [ r_a1, m1 ] ] ] with params {id=4}
05-30-2019 08:42 AM
First you should use $id
instead of {id}
- the latter is deprecated notation.
I'm not sure if your pattern comprehension in the RETURN
is correct.
05-30-2019 09:43 AM
Note that with params {id=4}
in that place in the query is not valid.
I think there's some confusion in how this is logged.
The full query is this:
MATCH (n:Person)
WHERE ID(n) = { id }
WITH n
RETURN n,[ [ (n)-[r_a1:ACTED_IN]->(m1:Movie) | [ r_a1, m1 ] ] ]
The with params
part is just context for what parameters were used when executing the query.
All the sessions of the conference are now available online