Skip to content

Instantly share code, notes, and snippets.

@peterneubauer
Created January 28, 2014 12:54
Show Gist options
  • Save peterneubauer/8667135 to your computer and use it in GitHub Desktop.
Save peterneubauer/8667135 to your computer and use it in GitHub Desktop.
optional match error
[source,cypher]
----
CREATE (node:TestThing1)-[:rel1]->(node2)-[:rel2]->(node3)
----
== Working
[source,cypher]
----
MATCH (n:TestThing1)
OPTIONAL MATCH n-[:rel1]->x
SET x.updated = timestamp()
----
== Not working
[source,cypher]
----
MATCH (n:TestThing1)
OPTIONAL MATCH n-[:rel2]->x
SET x.updated = timestamp()
----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment