You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NCC.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
= 22NCC
2
2
3
3
== Status description
4
-
error: data exception - node element type specified incorrectly. The node element type `{ <<graphTypeElement>> }` identified by the label `{ <<label>> }` is different to the one specified in the query `{ <<graphTypeElement>> }`.
4
+
error: data exception - node element type specified incorrectly. The node element type `{ <<graphTypeElement>>1 }` identified by the label `{ <<label>> }` is different to the one specified in the query `{ <<graphTypeElement>>2 }`.
5
5
6
6
== Explanation
7
7
This error occurs when attempting to drop a node element type from the graph type, but the specified element type does not match the existing one for the given label.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NCD.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
= 22NCD
2
2
3
3
== Status description
4
-
error: data exception - relationship element type specified incorrectly. The relationship element type `{ <<graphTypeElement>> }` identified by the relationship type `{ <<relType>> }` is different to the one specified in the query `{ <<graphTypeElement>> }`.
4
+
error: data exception - relationship element type specified incorrectly. The relationship element type `{ <<graphTypeElement>>1 }` identified by the relationship type `{ <<relType>> }` is different to the one specified in the query `{ <<graphTypeElement>>2 }`.
5
5
6
6
== Explanation
7
7
This error occurs when attempting to drop a relationship element type from the graph type, but the specified element type does not match the existing one for the given relationship type.
Copy file name to clipboardExpand all lines: modules/ROOT/pages/errors/gql-errors/22NCF.adoc
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ This also applies to graph type constraints defined inline of the graph type ele
10
10
11
11
== Example scenario
12
12
13
-
=== ALTER
13
+
=== ALTER existing constraint
14
14
15
15
Given the existing graph type:
16
16
@@ -51,6 +51,44 @@ ALTER CURRENT GRAPH TYPE ADD {
51
51
}
52
52
----
53
53
54
+
=== Remove a KEY constraint using ALTER
55
+
56
+
Given the existing graph type:
57
+
58
+
[source,cypher]
59
+
----
60
+
ALTER CURRENT GRAPH TYPE SET {
61
+
( :Person => {name :: STRING })
62
+
}
63
+
----
64
+
65
+
Execute the query:
66
+
67
+
[source,cypher]
68
+
----
69
+
ALTER CURRENT GRAPH TYPE ALTER {
70
+
( :Person => {name :: STRING IS KEY } )
71
+
}
72
+
----
73
+
74
+
The query returns an error with GQLSTATUS 22NCF and the status description:
75
+
76
+
77
+
[source]
78
+
----
79
+
error: data exception - graph type constraint not supported. Graph type constraint definitions are not supported in the `ALTER GRAPH TYPE ALTER` operation.
80
+
----
81
+
82
+
To fix this, change the query as follows:
83
+
84
+
[source, cypher]
85
+
----
86
+
ALTER CURRENT GRAPH TYPE ADD {
87
+
CONSTRAINT nameForKeyConstraint FOR (p:Person) REQUIRE p.name :: STRING IS KEY
88
+
}
89
+
90
+
----
91
+
54
92
=== DROP
55
93
56
94
In this example we attempt to drop an undesignated constraint with an ALTER CURRENT GRAPH TYPE DROP query.
0 commit comments