neo4j密码无法识别我的参数图

时间:2018-11-24 17:41:25

标签: node.js neo4j cypher

此问题的不同之处在于它更为明确。尽管先前的问题相关,但还有其他问题,包括apoc的实现。答案也不清楚。

我有一个参数映射paramObj(来自console.log)

{“ email”:“ xyz@abc.com”,“ password”:“ password123”,“ category”:“ Owner”,“ name”:“ Michael”“ paramVehicles”:[“ Honda”,“ Chevrolet “,” BMW“],” paramVehicleProps“:[]}

和密码查询queryDB(来自console.log)

CREATE (user:Person:Owner {email: $email})
  SET user.name = $name, user.password = $password
  WITH user, $paramVehicles AS vehicles
  UNWIND vehicles AS vehicle
  MATCH(v:Vehicles {name:vehicle})
  MERGE (user)-[r:OWNS {since: timestamp()}]->(v)
  RETURN user,r,v

与会话.run(queryDB,paramObj).then ....工作正常。但是,当我尝试在SET + = $ paramObj中使用paramObj时出现错误

CREATE (user:Person:Owner {email: $email})
SET user += $paramObj
WITH user, $paramVehicles AS vehicles
UNWIND vehicles AS vehicle
MATCH(v:Vehicles {name:vehicle})
MERGE (user)-[r:OWNS {since: timestamp()}]->(v)
RETURN user,r,v

错误:{“代码”:“ Neo.ClientError.Statement.ParameterMissing”,“名称”:“ Neo4jError”}

其他组合(例如SET + = paramObj或SET + = {paramObj})会导致相同的错误或语法错误。我正在将Neo4j 3.4.5与在Neo4j Desktop上运行的nodejs一起使用。仅在代码中浏览器中不会发生此错误。我在这里想念什么?

0 个答案:

没有答案