Skip to content

Commit 4a2282c

Browse files
committed
GH-2669 - Don't query for internally generated id.
This is unnecessary because the property itself won't exist in this case, but only id(node). More visible now because Neo4j 5+ logs unknown property querying. Closes #2669
1 parent 28e051b commit 4a2282c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/springframework/data/neo4j/core/mapping/CypherGenerator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,10 @@ private List<Object> projectNodeProperties(PropertyFilter.RelaxedPropertyPath pa
735735
continue;
736736
}
737737

738+
// ignore internally generated id fields
739+
if (graphProperty.isIdProperty() && (nodeDescription.getIdDescription() != null && nodeDescription.getIdDescription().isInternallyGeneratedId())) {
740+
continue;
741+
}
738742
nodePropertiesProjection.add(graphProperty.getPropertyName());
739743
}
740744

0 commit comments

Comments
 (0)