Neo4j 2.3.0事务REST端点服务错误

时间:2015-12-11 09:56:10

标签: neo4j cypher

从REST端点执行cypher查询时出现错误

Message: Failed: [{"code":"Neo.ClientError.Statement.InvalidSyntax","message":"Invalid input 'H': expected 'i/I' (line 1, column 39 (offset: 38))\n\"MATCH (n:User) SET n += {properties} WHERE ID(n) = {id} RETURN ID(n) as id, n as user\"\n ^"}]

查询REST端点: - " /分贝/数据/交易/提交"

{ 
statement: 'MATCH (n:User) SET n += {properties} WHERE ID(n) = {id} RETURN ID(n) as id, n as user', 
parameters: { id: 185, properties: { lastName: 'Banderas', age: 40 } } 
}

{ statement: 'MATCH (n:User) SET n += {properties} WHERE ID(n) = {id} RETURN ID(n) as id, n as user', parameters: { id: 185, properties: { lastName: 'Banderas', age: 40 } } }

1 个答案:

答案 0 :(得分:0)

WHERE子句应该在SET之前:

MATCH (n:User) WHERE ID(n) = {id}
SET n += {properties}