Skip to content

Commit 3d94913

Browse files
GH-2648 - Upgrade Cypher-DSL to 2022.8.3.
Closes #2648.
1 parent f10f68c commit 3d94913

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<checkstyle.skip>${skipTests}</checkstyle.skip>
7878
<checkstyle.version>8.40</checkstyle.version>
7979
<classgraph.version>4.8.149</classgraph.version>
80-
<cypher-dsl.version>2022.6.0</cypher-dsl.version>
80+
<cypher-dsl.version>2022.8.3</cypher-dsl.version>
8181
<dist.id>spring-data-neo4j</dist.id>
8282
<dist.key>SDNEO4J</dist.key>
8383
<flatten-maven-plugin.version>1.2.5</flatten-maven-plugin.version>

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
@@ -34,6 +34,8 @@
3434
import java.util.function.UnaryOperator;
3535
import java.util.regex.Pattern;
3636

37+
import javax.lang.model.SourceVersion;
38+
3739
import org.apiguardian.api.API;
3840
import org.neo4j.cypherdsl.core.Condition;
3941
import org.neo4j.cypherdsl.core.Conditions;
@@ -55,6 +57,7 @@
5557
import org.neo4j.cypherdsl.core.SymbolicName;
5658
import org.neo4j.cypherdsl.core.renderer.Configuration;
5759
import org.neo4j.cypherdsl.core.renderer.Renderer;
60+
import org.neo4j.cypherdsl.core.utils.Assertions;
5861
import org.springframework.data.domain.Sort;
5962
import org.springframework.data.mapping.MappingException;
6063
import org.springframework.data.mapping.PersistentProperty;
@@ -619,6 +622,7 @@ public Collection<Expression> createReturnStatementForMatch(Neo4jPersistentEntit
619622
expression = Cypher.property(property.substring(0, firstDot), tail);
620623
} else {
621624
try {
625+
Assertions.isTrue(SourceVersion.isIdentifier(property), "Name must be a valid identifier.");
622626
expression = Cypher.name(property);
623627
} catch (IllegalArgumentException e) {
624628
if (e.getMessage().endsWith(".")) {

0 commit comments

Comments
 (0)