Skip to content

Commit 0c184f1

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 ed842c1 commit 0c184f1

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

+4
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,10 @@ private List<Object> projectNodeProperties(PropertyFilter.RelaxedPropertyPath pa
734734
continue;
735735
}
736736

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

0 commit comments

Comments
 (0)