diff --git a/modules/ROOT/pages/changelogs.adoc b/modules/ROOT/pages/changelogs.adoc index 93a1e165..9a733cfd 100644 --- a/modules/ROOT/pages/changelogs.adoc +++ b/modules/ROOT/pages/changelogs.adoc @@ -1,6 +1,16 @@ :description: This page lists all changes to status codes per Neo4j version. = Changes to status codes per Neo4j version +== Neo4j 5.5 + + +**New:** + +[source, status codes, role="noheader"] +----- +Neo.ClientNotification.Statement.RepeatedRelationshipReference +----- + == Neo4j 5.0 **New:** diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index c275fb36..e0fa576c 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -1042,4 +1042,40 @@ a|The query used a procedure that generated a warning. m|WARNING |Category m|GENERIC -|=== \ No newline at end of file +|=== + +[#_neo_clientnotification_statement_repeatedrelationshipreference] +=== Neo.ClientNotification.Statement.RepeatedRelationshipReference (when run on version 5.5 or newer) + +.Notification category details +[cols="<1s,<4"] +|=== +|Code +m|Neo.ClientNotification.Statement.RepeatedRelationshipReference +|Title +a|The query returns no results because a relationship variable is bound more than once. +|Severity +m|WARNING +|Category +m|GENERIC +|=== + +.Binding a relationship variable more than once. +==== +Query:: ++ +[source,cypher] +---- +MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r +---- +Description of the returned code:: +A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (Relationship `r` was repeated) + +Suggestions for improvement:: +Use one pattern to match all relationships that start with a node with the label `A` and end with a node with the label `B`: ++ +[source, cypher, role="noplay"] +---- +MATCH (:A)-[r]->(:B) RETURN r +---- +====