From 7edbd9f71d58e0a3f257179f3b2e1646c7c77e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 21 Nov 2023 16:15:33 +0100 Subject: [PATCH] Replaced deprecated pattern (#780) (#787) Cross-references in CREATE statements are deprecated, as their semantics are often unclear. Co-authored-by: Arne Fischereit <79841228+arnefischereit@users.noreply.github.com> --- modules/ROOT/pages/styleguide.adoc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/ROOT/pages/styleguide.adoc b/modules/ROOT/pages/styleguide.adoc index e95837226..b1de62712 100644 --- a/modules/ROOT/pages/styleguide.adoc +++ b/modules/ROOT/pages/styleguide.adoc @@ -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.