Neo4j/Cypher: Setting a map and property yields “expected valid query body”

ε祈祈猫儿з 提交于 2019-12-13 05:07:48

问题


The following query fails:

MATCH n:User
WHERE n.email = "test"
SET n = {data}, n.created = timestamp()
RETURN n

Is this expected? Is it a bug? Is there a workaround? Do I have to compute the timestamp and send it along with {data}?


回答1:


A slight modification of your statement using 2 SET clauses works:

MATCH n:User
WHERE n.email = "test"
SET n = {data} 
SET n.created = timestamp()
RETURN n


来源:https://stackoverflow.com/questions/17686010/neo4j-cypher-setting-a-map-and-property-yields-expected-valid-query-body

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!