Cypher: Setting multiple properties on a node

89 views
Skip to first unread message

Luanne Coutinho

unread,
Oct 12, 2012, 6:54:46 AM10/12/12
to ne...@googlegroups.com
Hi,

I am trying to set multiple properties on a node by passing to the ExecutionEngine a Map<String, Object>.
The query is: start n=node:companies(id={id}) match (n)-[old?:parent_company]-(oldParent) set n={props} delete old

The error I get is:

`.' expected but `=' found

What am I missing?
I'm using 1.8

Thanks
Luanne
    

Luanne Coutinho

unread,
Oct 12, 2012, 6:56:47 AM10/12/12
to ne...@googlegroups.com
Forgot to add the stacktrace:


"start n=node:companies(id={id}) match (n)-[old?:parent_company]-(oldParent) set n={props} delete old"
                                                                                  ^
    at org.neo4j.cypher.internal.parser.v1_8.CypherParserImpl.parse(CypherParserImpl.scala:46)
    at org.neo4j.cypher.CypherParser.parse(CypherParser.scala:44)
    at org.neo4j.cypher.ExecutionEngine$$anonfun$prepare$1.apply(ExecutionEngine.scala:61)
    at org.neo4j.cypher.ExecutionEngine$$anonfun$prepare$1.apply(ExecutionEngine.scala:61)
    at org.neo4j.cypher.internal.LRUCache.getOrElseUpdate(LRUCache.scala:31)
    at org.neo4j.cypher.ExecutionEngine.prepare(ExecutionEngine.scala:61)
    at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:55)
    at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:58)
    at org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:86)
Reply all
Reply to author
Forward
0 new messages