File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/main/java/org/springframework/data/neo4j/core/mapping Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 77
77
<checkstyle .skip>${skipTests} </checkstyle .skip>
78
78
<checkstyle .version>8.40</checkstyle .version>
79
79
<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>
81
81
<dist .id>spring-data-neo4j</dist .id>
82
82
<dist .key>SDNEO4J</dist .key>
83
83
<flatten-maven-plugin .version>1.2.5</flatten-maven-plugin .version>
Original file line number Diff line number Diff line change 34
34
import java .util .function .UnaryOperator ;
35
35
import java .util .regex .Pattern ;
36
36
37
+ import javax .lang .model .SourceVersion ;
38
+
37
39
import org .apiguardian .api .API ;
38
40
import org .neo4j .cypherdsl .core .Condition ;
39
41
import org .neo4j .cypherdsl .core .Conditions ;
55
57
import org .neo4j .cypherdsl .core .SymbolicName ;
56
58
import org .neo4j .cypherdsl .core .renderer .Configuration ;
57
59
import org .neo4j .cypherdsl .core .renderer .Renderer ;
60
+ import org .neo4j .cypherdsl .core .utils .Assertions ;
58
61
import org .springframework .data .domain .Sort ;
59
62
import org .springframework .data .mapping .MappingException ;
60
63
import org .springframework .data .mapping .PersistentProperty ;
@@ -619,6 +622,7 @@ public Collection<Expression> createReturnStatementForMatch(Neo4jPersistentEntit
619
622
expression = Cypher .property (property .substring (0 , firstDot ), tail );
620
623
} else {
621
624
try {
625
+ Assertions .isTrue (SourceVersion .isIdentifier (property ), "Name must be a valid identifier." );
622
626
expression = Cypher .name (property );
623
627
} catch (IllegalArgumentException e ) {
624
628
if (e .getMessage ().endsWith ("." )) {
You can’t perform that action at this time.
0 commit comments