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/22N31.adoc
+44-1Lines changed: 44 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,50 @@
2
2
3
3
4
4
== Status description
5
-
error: data exception - invalid properties in merge pattern. `MERGE` cannot be used with graph element property values that are null or NaN.
5
+
error: data exception - invalid properties in merge pattern. The { <<entityType>> } property { <<propKey>> } in { <<pat>> } is invalid. `MERGE` cannot be used with a graph element property value that is { <<value>> }.
6
+
7
+
== Explanation
8
+
This error occurs when a `MERGE` pattern includes a node or relationship property value that is not allowed, such as `null` or `NaN`.
9
+
Because `MERGE` must be able to match or create a concrete graph element, these invalid values are rejected.
10
+
11
+
== Example scenarios
12
+
13
+
Let's take the following example scenarios:
14
+
15
+
=== Null property value in a `MERGE` pattern
16
+
For example, try to merge a node with a `null` property value as follows:
17
+
18
+
[source,cypher]
19
+
----
20
+
MERGE (p:Person {age: null})
21
+
----
22
+
23
+
The query returns an error with GQLSTATUS 22N31 and the status description:
24
+
25
+
[source]
26
+
----
27
+
error: data exception - invalid properties in merge pattern. 'MERGE' cannot be used with graph element property values that are null. For node property 'age' in '(:Person {age: null})'.
28
+
----
29
+
30
+
In this case, provide a concrete value for the property, or remove it from the `MERGE` pattern.
31
+
32
+
=== NaN property value in a `MERGE` pattern
33
+
For example, try to merge a relationship with a `NaN` property value as follows:
The query returns an error with GQLSTATUS 22N31 and the status description:
42
+
43
+
[source]
44
+
----
45
+
error: data exception - invalid properties in merge pattern. 'MERGE' cannot be used with graph element property values that are NaN. For relationship property 'score' in '(:Person)-[:KNOWS {score: NaN}]->(:Person)'.
46
+
----
47
+
48
+
In this case, provide a numeric value for the property, or remove it from the `MERGE` pattern.
0 commit comments