1
我使用Transactional Cypher HTTP端点(http://localhost:7474/db/data/transaction/commit
)发布到Neo4j。我的JSON文章看起来像下面这样。Neo4j match statement params error
"statements": [{
statement: 'MATCH (n:user {username: {userdata}.username})\nRETURN n',
params: {userdata: {username: 'pewpewlasers'}}
}]
这将导致以下错误:
{
code: 'Neo.ClientError.Statement.ParameterMissing',
message: 'Expected a parameter named userdata'
}
我不明白我错过了什么。
肯定的,但我也手动指定参数'n:user {username:{userdata} .username}'。您建议的问题只会在使用'n:user {userdata}'时发生。在我的情况下,它甚至无法找到'userdata'。 – pewpewlasers 2014-11-02 12:53:07
是的,就是我所说的,你传递一张地图,但你必须传递关键/值对中的参数。您不能在匹配子句中使用{map} .property,只有{propertyKey} – 2014-11-02 13:01:31
但是如果我使用“Legacy Cypher HTTP端点”而不是“Transactional Cypher HTTP端点”,则“MATCH”中的{{}} .property仍然有效。 。任何想法为什么? – pewpewlasers 2014-11-02 13:31:39