Skip to content

Commit

Permalink
Replaced deprecated pattern (#780) (#787)
Browse files Browse the repository at this point in the history
Cross-references in CREATE statements are deprecated, as their semantics
are often unclear.

Co-authored-by: Arne Fischereit <[email protected]>
  • Loading branch information
JPryce-Aklundh and arnefischereit authored Nov 21, 2023
1 parent 1631c8d commit 7edbd9f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions modules/ROOT/pages/styleguide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -360,17 +360,15 @@ RETURN count(vehicle)
.Bad
[source, cypher]
----
CREATE (a:End {prop: 42}),
(b:End {prop: 3}),
(c:Begin {prop: elementId(a)})
MATCH (kate:Person {name: 'Kate'})-[r:LIKES]-(c:Car)
RETURN c.type
----
+
.Good
[source, cypher]
----
CREATE (a:End {prop: 42}),
(:End {prop: 3}),
(:Begin {prop: elementId(a)})
MATCH (:Person {name: 'Kate'})-[:LIKES]-(c:Car)
RETURN c.type
----

* Chain patterns together to avoid repeating variables.
Expand Down

0 comments on commit 7edbd9f

Please sign in to comment.