With Params query error

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

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}

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.

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.