Skip to content

Commit 2861e77

Browse files
refactor: Move away from deprecated Cypher-DSL constructs. (#2895)
All relevant Cypher integrations is available on `Cypher` for a while now. To be able to remove them in Cypher-DSL 2024.0.0, we must make sure they are not used here anymore, as Cypher-DSL has a couple of integration tests with SDN6. Also, leading by example is always nice.
1 parent c7726d2 commit 2861e77

27 files changed

+131
-151
lines changed

pom.xml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<checkstyle.skip>${skipTests}</checkstyle.skip>
7777
<checkstyle.version>8.40</checkstyle.version>
7878
<classgraph.version>4.8.149</classgraph.version>
79-
<cypher-dsl.version>2023.2.0</cypher-dsl.version>
79+
<cypher-dsl.version>2023.9.5</cypher-dsl.version>
8080
<dist.id>spring-data-neo4j</dist.id>
8181
<dist.key>SDNEO4J</dist.key>
8282
<flatten-maven-plugin.version>1.2.5</flatten-maven-plugin.version>
@@ -118,6 +118,13 @@
118118

119119
<dependencyManagement>
120120
<dependencies>
121+
<dependency>
122+
<groupId>org.neo4j</groupId>
123+
<artifactId>neo4j-cypher-dsl-bom</artifactId>
124+
<version>${cypher-dsl.version}</version>
125+
<type>pom</type>
126+
<scope>import</scope>
127+
</dependency>
121128
<dependency>
122129
<groupId>com.google.code.findbugs</groupId>
123130
<artifactId>jsr305</artifactId>
@@ -187,22 +194,6 @@
187194
<artifactId>neo4j</artifactId>
188195
<version>${neo4j.version}</version>
189196
</dependency>
190-
<dependency>
191-
<groupId>org.neo4j</groupId>
192-
<artifactId>neo4j-cypher-dsl</artifactId>
193-
<version>${cypher-dsl.version}</version>
194-
<exclusions>
195-
<exclusion>
196-
<artifactId>annotations</artifactId>
197-
<groupId>org.jetbrains</groupId>
198-
</exclusion>
199-
</exclusions>
200-
</dependency>
201-
<dependency>
202-
<groupId>org.neo4j</groupId>
203-
<artifactId>neo4j-cypher-dsl-schema-name-support</artifactId>
204-
<version>${cypher-dsl.version}</version>
205-
</dependency>
206197
<dependency>
207198
<groupId>org.neo4j.driver</groupId>
208199
<artifactId>neo4j-java-driver</artifactId>

src/main/java/org/springframework/data/neo4j/core/Neo4jTemplate.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import org.neo4j.cypherdsl.core.Condition;
4444
import org.neo4j.cypherdsl.core.Cypher;
4545
import org.neo4j.cypherdsl.core.FunctionInvocation;
46-
import org.neo4j.cypherdsl.core.Functions;
4746
import org.neo4j.cypherdsl.core.Named;
4847
import org.neo4j.cypherdsl.core.Node;
4948
import org.neo4j.cypherdsl.core.Statement;
@@ -190,7 +189,7 @@ ProjectionFactory getProjectionFactory() {
190189
public long count(Class<?> domainType) {
191190

192191
Neo4jPersistentEntity<?> entityMetaData = neo4jMappingContext.getRequiredPersistentEntity(domainType);
193-
Statement statement = cypherGenerator.prepareMatchOf(entityMetaData).returning(Functions.count(asterisk()))
192+
Statement statement = cypherGenerator.prepareMatchOf(entityMetaData).returning(Cypher.count(asterisk()))
194193
.build();
195194

196195
return count(statement);

src/main/java/org/springframework/data/neo4j/core/ReactiveNeo4jTemplate.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.neo4j.cypherdsl.core.Condition;
2121
import org.neo4j.cypherdsl.core.Cypher;
2222
import org.neo4j.cypherdsl.core.FunctionInvocation;
23-
import org.neo4j.cypherdsl.core.Functions;
2423
import org.neo4j.cypherdsl.core.Named;
2524
import org.neo4j.cypherdsl.core.Node;
2625
import org.neo4j.cypherdsl.core.Statement;
@@ -179,7 +178,7 @@ ProjectionFactory getProjectionFactory() {
179178
public Mono<Long> count(Class<?> domainType) {
180179

181180
Neo4jPersistentEntity<?> entityMetaData = neo4jMappingContext.getRequiredPersistentEntity(domainType);
182-
Statement statement = cypherGenerator.prepareMatchOf(entityMetaData).returning(Functions.count(asterisk())).build();
181+
Statement statement = cypherGenerator.prepareMatchOf(entityMetaData).returning(Cypher.count(asterisk())).build();
183182

184183
return count(statement);
185184
}

src/main/java/org/springframework/data/neo4j/core/TemplateSupport.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import org.apiguardian.api.API;
3737
import org.neo4j.cypherdsl.core.Cypher;
3838
import org.neo4j.cypherdsl.core.FunctionInvocation;
39-
import org.neo4j.cypherdsl.core.Functions;
4039
import org.neo4j.cypherdsl.core.Named;
4140
import org.neo4j.cypherdsl.core.Node;
4241
import org.neo4j.cypherdsl.core.Relationship;
@@ -187,7 +186,7 @@ static final class NodesAndRelationshipsByIdStatementProvider {
187186
private final static String RELATED_NODE_IDS = "relatedNodeIds";
188187

189188
final static NodesAndRelationshipsByIdStatementProvider EMPTY =
190-
new NodesAndRelationshipsByIdStatementProvider(Collections.emptySet(), Collections.emptySet(), Collections.emptySet(), new QueryFragments(), SpringDataCypherDsl.elementIdOrIdFunction.apply(Dialect.DEFAULT));
189+
new NodesAndRelationshipsByIdStatementProvider(Collections.emptySet(), Collections.emptySet(), Collections.emptySet(), new QueryFragments(), SpringDataCypherDsl.elementIdOrIdFunction.apply(Dialect.NEO4J_4));
191190

192191
private final Map<String, Collection<String>> parameters = new HashMap<>(3);
193192
private final QueryFragments queryFragments;
@@ -223,16 +222,16 @@ Statement toStatement(NodeDescription<?> nodeDescription) {
223222
Relationship relationships = Cypher.anyNode().relationshipBetween(Cypher.anyNode()).named(RELATIONSHIP_IDS);
224223
return Cypher.match(rootNodes)
225224
.where(elementIdFunction.apply(rootNodes).in(Cypher.parameter(ROOT_NODE_IDS)))
226-
.with(Functions.collect(rootNodes).as(Constants.NAME_OF_ROOT_NODE))
225+
.with(Cypher.collect(rootNodes).as(Constants.NAME_OF_ROOT_NODE))
227226
.optionalMatch(relationships)
228227
.where(elementIdFunction.apply(relationships).in(Cypher.parameter(RELATIONSHIP_IDS)))
229-
.with(Constants.NAME_OF_ROOT_NODE, Functions.collectDistinct(relationships).as(Constants.NAME_OF_SYNTHESIZED_RELATIONS))
228+
.with(Constants.NAME_OF_ROOT_NODE, Cypher.collectDistinct(relationships).as(Constants.NAME_OF_SYNTHESIZED_RELATIONS))
230229
.optionalMatch(relatedNodes)
231230
.where(elementIdFunction.apply(relatedNodes).in(Cypher.parameter(RELATED_NODE_IDS)))
232231
.with(
233232
Constants.NAME_OF_ROOT_NODE,
234233
Cypher.name(Constants.NAME_OF_SYNTHESIZED_RELATIONS).as(Constants.NAME_OF_SYNTHESIZED_RELATIONS),
235-
Functions.collectDistinct(relatedNodes).as(Constants.NAME_OF_SYNTHESIZED_RELATED_NODES)
234+
Cypher.collectDistinct(relatedNodes).as(Constants.NAME_OF_SYNTHESIZED_RELATED_NODES)
236235
)
237236
.unwind(Constants.NAME_OF_ROOT_NODE).as(ROOT_NODE_IDS)
238237
.with(
@@ -431,7 +430,7 @@ static boolean rendererCanUseElementIdIfPresent(Renderer renderer, Neo4jPersiste
431430
}
432431

433432
static boolean rendererRendersElementId(Renderer renderer) {
434-
return renderer.render(Cypher.returning(Functions.elementId(Cypher.anyNode("n"))).build())
433+
return renderer.render(Cypher.returning(Cypher.elementId(Cypher.anyNode("n"))).build())
435434
.equals("RETURN elementId(n)");
436435
}
437436

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

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
package org.springframework.data.neo4j.core.mapping;
1717

1818
import static org.neo4j.cypherdsl.core.Cypher.anyNode;
19+
import static org.neo4j.cypherdsl.core.Cypher.coalesce;
20+
import static org.neo4j.cypherdsl.core.Cypher.collect;
1921
import static org.neo4j.cypherdsl.core.Cypher.listBasedOn;
2022
import static org.neo4j.cypherdsl.core.Cypher.literalOf;
2123
import static org.neo4j.cypherdsl.core.Cypher.match;
2224
import static org.neo4j.cypherdsl.core.Cypher.node;
2325
import static org.neo4j.cypherdsl.core.Cypher.optionalMatch;
2426
import static org.neo4j.cypherdsl.core.Cypher.parameter;
25-
import static org.neo4j.cypherdsl.core.Functions.coalesce;
2627

2728
import java.util.ArrayList;
2829
import java.util.Arrays;
@@ -39,11 +40,9 @@
3940

4041
import org.apiguardian.api.API;
4142
import org.neo4j.cypherdsl.core.Condition;
42-
import org.neo4j.cypherdsl.core.Conditions;
4343
import org.neo4j.cypherdsl.core.Cypher;
4444
import org.neo4j.cypherdsl.core.Expression;
4545
import org.neo4j.cypherdsl.core.FunctionInvocation;
46-
import org.neo4j.cypherdsl.core.Functions;
4746
import org.neo4j.cypherdsl.core.IdentifiableElement;
4847
import org.neo4j.cypherdsl.core.MapProjection;
4948
import org.neo4j.cypherdsl.core.Named;
@@ -87,9 +86,9 @@ public enum CypherGenerator {
8786
// default elementId function
8887
private Function<Named, FunctionInvocation> elementIdOrIdFunction = named -> {
8988
if (named instanceof Node node) {
90-
return Functions.elementId(node);
89+
return Cypher.elementId(node);
9190
} else if (named instanceof Relationship relationship) {
92-
return Functions.elementId(relationship);
91+
return Cypher.elementId(relationship);
9392
} else {
9493
throw new IllegalArgumentException("Unsupported CypherDSL type: " + named.getClass());
9594
}
@@ -140,7 +139,8 @@ public StatementBuilder.OrderableOngoingReadingAndWith prepareMatchOf(NodeDescri
140139
List<IdentifiableElement> expressions = new ArrayList<>();
141140
expressions.add(rootNode.getRequiredSymbolicName());
142141
if (nodeDescription instanceof Neo4jPersistentEntity<?> entity && entity.isUsingDeprecatedInternalId()) {
143-
expressions.add(Functions.id(rootNode).as(Constants.NAME_OF_INTERNAL_ID));
142+
//noinspection deprecation
143+
expressions.add(rootNode.internalId().as(Constants.NAME_OF_INTERNAL_ID));
144144
}
145145
expressions.add(elementIdOrIdFunction.apply(rootNode).as(Constants.NAME_OF_ELEMENT_ID));
146146

@@ -155,7 +155,7 @@ public StatementBuilder.OngoingReading prepareMatchOf(NodeDescription<?> nodeDes
155155
StatementBuilder.OngoingReadingWithoutWhere match = prepareMatchOfRootNode(rootNode, initialMatchOn);
156156

157157
List<IdentifiableElement> expressions = new ArrayList<>();
158-
expressions.add(Functions.collect(elementIdOrIdFunction.apply(rootNode)).as(Constants.NAME_OF_SYNTHESIZED_ROOT_NODE));
158+
expressions.add(Cypher.collect(elementIdOrIdFunction.apply(rootNode)).as(Constants.NAME_OF_SYNTHESIZED_ROOT_NODE));
159159

160160
return match
161161
.where(conditionOrNoCondition(condition))
@@ -192,9 +192,9 @@ public StatementBuilder.OngoingReading prepareMatchOf(NodeDescription<?> nodeDes
192192

193193
relationship = relationship.named(Constants.NAME_OF_SYNTHESIZED_RELATIONS);
194194
List<IdentifiableElement> expressions = new ArrayList<>();
195-
expressions.add(Functions.collect(elementIdOrIdFunction.apply(rootNode)).as(Constants.NAME_OF_SYNTHESIZED_ROOT_NODE));
196-
expressions.add(Functions.collect(elementIdOrIdFunction.apply(targetNode)).as(Constants.NAME_OF_SYNTHESIZED_RELATED_NODES));
197-
expressions.add(Functions.collect(elementIdOrIdFunction.apply(relationship)).as(Constants.NAME_OF_SYNTHESIZED_RELATIONS));
195+
expressions.add(Cypher.collect(elementIdOrIdFunction.apply(rootNode)).as(Constants.NAME_OF_SYNTHESIZED_ROOT_NODE));
196+
expressions.add(Cypher.collect(elementIdOrIdFunction.apply(targetNode)).as(Constants.NAME_OF_SYNTHESIZED_RELATED_NODES));
197+
expressions.add(Cypher.collect(elementIdOrIdFunction.apply(relationship)).as(Constants.NAME_OF_SYNTHESIZED_RELATIONS));
198198

199199
return match
200200
.where(conditionOrNoCondition(condition))
@@ -251,14 +251,14 @@ public Statement createStatementReturningDynamicLabels(NodeDescription<?> nodeDe
251251
versionCondition = rootNode.property(versionProperty.getName())
252252
.isEqualTo(coalesce(parameter(Constants.NAME_OF_VERSION_PARAM), literalOf(0)));
253253
} else {
254-
versionCondition = Conditions.noCondition();
254+
versionCondition = Cypher.noCondition();
255255
}
256256

257257
return match(rootNode)
258258
.where(idDescription.asIdExpression().isEqualTo(parameter(Constants.NAME_OF_ID)))
259259
.and(versionCondition).unwind(rootNode.labels()).as("label").with(Cypher.name("label"))
260260
.where(Cypher.name("label").in(parameter(Constants.NAME_OF_STATIC_LABELS_PARAM)).not())
261-
.returning(Functions.collect(Cypher.name("label")).as(Constants.NAME_OF_LABELS)).build();
261+
.returning(collect(Cypher.name("label")).as(Constants.NAME_OF_LABELS)).build();
262262
}
263263

264264
public Statement prepareDeleteOf(NodeDescription<?> nodeDescription) {
@@ -276,7 +276,7 @@ public Statement prepareDeleteOf(NodeDescription<?> nodeDescription, @Nullable C
276276
.named(Constants.NAME_OF_TYPED_ROOT_NODE.apply(nodeDescription));
277277
OngoingUpdate ongoingUpdate = match(rootNode).where(conditionOrNoCondition(condition)).detachDelete(rootNode);
278278
if (count) {
279-
return ongoingUpdate.returning(Functions.count(rootNode)).build();
279+
return ongoingUpdate.returning(Cypher.count(rootNode)).build();
280280
}
281281
return ongoingUpdate.build();
282282
}
@@ -289,7 +289,7 @@ public Condition createCompositePropertyCondition(GraphPropertyDescription idPro
289289

290290
Neo4jPersistentProperty property = (Neo4jPersistentProperty) idProperty;
291291

292-
Condition result = Conditions.noCondition();
292+
Condition result = Cypher.noCondition();
293293
for (String key : property.getOptionalConverter().write(null).keys()) {
294294
Property expression = Cypher.property(containerName, key);
295295
result = result.and(expression.isEqualTo(actualParameter.property(key)));
@@ -420,7 +420,7 @@ public Statement prepareSaveOfMultipleInstancesOf(NodeDescription<?> nodeDescrip
420420

421421
List<Expression> expressions = new ArrayList<>();
422422
if (nodeDescription instanceof Neo4jPersistentEntity<?> entity && entity.isUsingDeprecatedInternalId()) {
423-
Functions.id(rootNode).as(Constants.NAME_OF_INTERNAL_ID);
423+
rootNode.internalId().as(Constants.NAME_OF_INTERNAL_ID);
424424
}
425425
expressions.add(elementIdOrIdFunction.apply(rootNode).as(Constants.NAME_OF_ELEMENT_ID));
426426
expressions.add(rootNode.property(nameOfIdProperty).as(Constants.NAME_OF_ID));
@@ -465,9 +465,9 @@ private static Function<Node, Expression> getNodeIdFunction(@Nullable Neo4jPersi
465465
var idProperty = entity.getRequiredIdProperty();
466466
if (entity.isUsingInternalIds()) {
467467
if (entity.isUsingDeprecatedInternalId() || !canUseElementId) {
468-
startNodeIdFunction = Functions::id;
468+
startNodeIdFunction = Node::internalId;
469469
} else {
470-
startNodeIdFunction = Functions::elementId;
470+
startNodeIdFunction = Cypher::elementId;
471471
}
472472
} else {
473473
startNodeIdFunction = node -> node.property(idProperty.getPropertyName());
@@ -479,25 +479,29 @@ private static Function<Node, Expression> getEndNodeIdFunction(@Nullable Neo4jPe
479479

480480
Function<Node, Expression> startNodeIdFunction;
481481
if (entity == null) {
482-
return Functions::elementId;
482+
return Cypher::elementId;
483483
}
484484
if (!entity.isUsingDeprecatedInternalId() && canUseElementId) {
485-
startNodeIdFunction = Functions::elementId;
485+
startNodeIdFunction = Cypher::elementId;
486486
} else {
487-
startNodeIdFunction = Functions::id;
487+
startNodeIdFunction = Node::internalId;
488488
}
489489
return startNodeIdFunction;
490490
}
491491

492+
static Expression relId(Relationship r) {
493+
return FunctionInvocation.create(() -> "id", r.getRequiredSymbolicName());
494+
}
495+
492496
private static Function<Relationship, Expression> getRelationshipIdFunction(RelationshipDescription relationshipDescription, boolean canUseElementId) {
493497

494-
Function<Relationship, Expression> result = canUseElementId ? Functions::elementId : Functions::id;
498+
Function<Relationship, Expression> result = canUseElementId ? Cypher::elementId : CypherGenerator::relId;
495499
if (relationshipDescription.hasRelationshipProperties()) {
496500
Neo4jPersistentEntity<?> entity = (Neo4jPersistentEntity<?>) relationshipDescription.getRelationshipPropertiesEntity();
497501
if ((entity != null && entity.isUsingDeprecatedInternalId()) || !canUseElementId) {
498-
result = Functions::id;
502+
result = CypherGenerator::relId;
499503
} else {
500-
result = Functions::elementId;
504+
result = Cypher::elementId;
501505
}
502506
}
503507
return result;
@@ -623,7 +627,7 @@ public Statement prepareUpdateOfRelationshipsWithProperties(Neo4jPersistentEntit
623627
private List<Expression> getReturnedIdExpressionsForRelationship(RelationshipDescription relationship, Relationship relationshipFragment) {
624628
List<Expression> result = new ArrayList<>();
625629
if (relationship.hasRelationshipProperties() && relationship.getRelationshipPropertiesEntity() instanceof Neo4jPersistentEntity<?> entity && entity.isUsingDeprecatedInternalId()) {
626-
result.add(Functions.id(relationshipFragment).as(Constants.NAME_OF_INTERNAL_ID));
630+
result.add(relId(relationshipFragment).as(Constants.NAME_OF_INTERNAL_ID));
627631
}
628632
result.add(elementIdOrIdFunction.apply(relationshipFragment).as(Constants.NAME_OF_ELEMENT_ID));
629633
return result;
@@ -661,7 +665,7 @@ public Statement prepareDeleteOf(
661665

662666
public Collection<Expression> createReturnStatementForExists(Neo4jPersistentEntity<?> nodeDescription) {
663667

664-
return Collections.singleton(Functions.count(Constants.NAME_OF_TYPED_ROOT_NODE.apply(nodeDescription)));
668+
return Collections.singleton(Cypher.count(Constants.NAME_OF_TYPED_ROOT_NODE.apply(nodeDescription)));
665669
}
666670

667671
public Collection<Expression> createReturnStatementForMatch(Neo4jPersistentEntity<?> nodeDescription) {
@@ -711,7 +715,7 @@ public Collection<Expression> createReturnStatementForMatch(Neo4jPersistentEntit
711715
}
712716
}
713717
if (order.isIgnoreCase()) {
714-
expression = Functions.toLower(expression);
718+
expression = Cypher.toLower(expression);
715719
}
716720
return order.isAscending() ? expression.ascending() : expression.descending();
717721
}).toArray(SortItem[]::new))
@@ -804,10 +808,11 @@ private List<Object> projectNodeProperties(PropertyFilter.RelaxedPropertyPath pa
804808
}
805809

806810
nodePropertiesProjection.add(Constants.NAME_OF_LABELS);
807-
nodePropertiesProjection.add(Functions.labels(node));
811+
nodePropertiesProjection.add(Cypher.labels(node));
808812
if (nodeDescription instanceof Neo4jPersistentEntity<?> entity && entity.isUsingDeprecatedInternalId()) {
809813
nodePropertiesProjection.add(Constants.NAME_OF_INTERNAL_ID);
810-
nodePropertiesProjection.add(Functions.id(node));
814+
//noinspection deprecation
815+
nodePropertiesProjection.add(node.internalId());
811816
}
812817
nodePropertiesProjection.add(Constants.NAME_OF_ELEMENT_ID);
813818
nodePropertiesProjection.add(elementIdOrIdFunction.apply(node));
@@ -876,7 +881,7 @@ private void generateListFor(PropertyFilter.RelaxedPropertyPath parentPath, Neo4
876881

877882
addMapProjection(relationshipTargetName,
878883
listBasedOn(relationship).returning(mapProjection
879-
.and(RelationshipDescription.NAME_OF_RELATIONSHIP_TYPE, Functions.type(relationship))),
884+
.and(RelationshipDescription.NAME_OF_RELATIONSHIP_TYPE, Cypher.type(relationship))),
880885
mapProjectionLists);
881886

882887
} else {
@@ -902,6 +907,6 @@ private void addMapProjection(String name, Object projection, List<Object> proje
902907
}
903908

904909
private static Condition conditionOrNoCondition(@Nullable Condition condition) {
905-
return condition == null ? Conditions.noCondition() : condition;
910+
return condition == null ? Cypher.noCondition() : condition;
906911
}
907912
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.apiguardian.api.API;
2121
import org.neo4j.cypherdsl.core.Cypher;
2222
import org.neo4j.cypherdsl.core.Expression;
23-
import org.neo4j.cypherdsl.core.Functions;
2423
import org.neo4j.cypherdsl.core.Node;
2524
import org.neo4j.cypherdsl.core.SymbolicName;
2625
import org.springframework.data.neo4j.core.schema.GeneratedValue;
@@ -99,7 +98,8 @@ private IdDescription(SymbolicName symbolicName, @Nullable Class<? extends IdGen
9998
this.idExpression = Lazy.of(() -> {
10099
final Node rootNode = Cypher.anyNode(symbolicName);
101100
if (this.isInternallyGeneratedId()) {
102-
return isDeprecated ? Functions.id(rootNode) : Functions.elementId(rootNode);
101+
//noinspection deprecation
102+
return isDeprecated ? rootNode.internalId() : rootNode.elementId();
103103
} else {
104104
return this.getOptionalGraphPropertyName()
105105
.map(propertyName -> Cypher.property(symbolicName, propertyName)).get();
@@ -121,7 +121,8 @@ public Expression asIdExpression() {
121121
public Expression asIdExpression(String nodeName) {
122122
final Node rootNode = Cypher.anyNode(nodeName);
123123
if (this.isInternallyGeneratedId()) {
124-
return isDeprecated ? Functions.id(rootNode) : Functions.elementId(rootNode);
124+
//noinspection deprecation
125+
return isDeprecated ? rootNode.internalId() : rootNode.elementId();
125126
} else {
126127
return this.getOptionalGraphPropertyName()
127128
.map(propertyName -> Cypher.property(nodeName, propertyName)).get();

0 commit comments

Comments
 (0)