Skip to content

Commit 1dcae86

Browse files
authored
docs > clauses > match > Relationship example wrong
Relationship example creates cypher query, where a (movie)-[:ACTED_IN]->(person). The query shown as the result of this does not match. I suggest adding the direction: "left" and adjusting the resulting query shown beneath.
1 parent 39364c0 commit 1dcae86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/modules/ROOT/pages/clauses/match.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ Relationships can be used in a match clause by creating the relevant xref:/patte
4747
[source, javascript]
4848
----
4949
const actedInPattern = new Cypher.Pattern(movieNode, { labels: ["Movie"] })
50-
.related({ type: "ACTED_IN" })
50+
.related({ type: "ACTED_IN" direction: "left" })
5151
.to(personNode, { labels: ["Person"] });
5252
5353
const matchQuery = new Cypher.Match(actedInPattern)
5454
----
5555

5656
[source, cypher]
5757
----
58-
MATCH (this1:`Person`)-[this0:ACTED_IN]->(this2:`Movie`)
58+
MATCH (this0:Movie)<-[:ACTED_IN]-(this1:Person)
5959
----
6060

6161
== Filtering with `WHERE`

0 commit comments

Comments
 (0)