Skip to content

Commit e82975b

Browse files
GH-2455 - Use the correctly, labelled root node.
Resolves #2455.
1 parent b7236a3 commit e82975b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public Statement createStatementReturningDynamicLabels(NodeDescription<?> nodeDe
219219
IdDescription idDescription = nodeDescription.getIdDescription();
220220
Assert.notNull(idDescription, "Cannot load specific nodes by id without a corresponding attribute.");
221221

222-
final Node rootNode = Cypher.anyNode(Constants.NAME_OF_TYPED_ROOT_NODE.apply(nodeDescription));
222+
final Node rootNode = createRootNode(nodeDescription);
223223

224224
Condition versionCondition;
225225
if (((Neo4jPersistentEntity<?>) nodeDescription).hasVersionProperty()) {

0 commit comments

Comments
 (0)