GH-2470 - Respect empty path with just one node.

Closes #2470
This commit is contained in:
Gerrit Meier
2022-01-20 17:12:17 +01:00
parent 3871020681
commit a9ddc46112

View File

@@ -186,6 +186,14 @@ public final class PreparedQuery<T> {
: value.asList(Value::asPath);
for (Path path : paths) {
if (path.length() == 0) {
// should only be exactly one
Iterable<Node> pathNodes = path.nodes();
for (Node pathNode : pathNodes) {
nodes.add(Values.value(pathNode));
}
continue;
}
Node lastNode = null;
for (Path.Segment segment : path) {
Node start = segment.start();