I'm trying to use a variable as a property name in neo4j
MATCH(e: Event {id: "123"})
MATCH(u: User {id: "456"})
MERGE (u)-[a:ACTION]->(e)
ON MATCH
SET e[a.t] = e[a.t] - 1
This gives the error:
Invalid input '[': expected an identifier character, whitespace, '{', 'x/X', node labels, a property map, a relationship pattern, '.', '(', '=' or "+=" (line 5, column 6 (offset: 96))
"SET e[a.t] = e[a.t] - 1"
While according to this forum: it should be possible. Neo4j forum
What am I doing wrong?