-
Notifications
You must be signed in to change notification settings - Fork 619
Add support for Value Expressions for Repository Query methods #2956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've been trying to make this work but I have a couple of tests failing but only when running from Maven
[ERROR] CypherGeneratorTest.shouldCreateRelationshipCreationQueryWithLabelIfPresent:63 expected: <MATCH (startNode:`Entity1`) WHERE startNode.id = $fromId MATCH (endNode) WHERE elementId(endNode) = $toId MERGE (startNode)<-[relProps:`REL`]-(endNode) RETURN elementId(relProps) AS __elementId__> but was: <MATCH (startNode:`Entity1`) WHERE startNode.id = $fromId MATCH (endNode) WHERE elementId(endNode) = $toId MERGE (startNode)<-[relProps:`REL`]-(endNode) RETURN id(relProps) AS __elementId__>
[ERROR] CypherGeneratorTest.shouldCreateRelationshipCreationQueryWithMultipleLabels:79 expected: <MATCH (startNode:`Entity1`:`MultipleLabel`) WHERE startNode.id = $fromId MATCH (endNode) WHERE elementId(endNode) = $toId MERGE (startNode)<-[relProps:`REL`]-(endNode) RETURN elementId(relProps) AS __elementId__> but was: <MATCH (startNode:`Entity1`:`MultipleLabel`) WHERE startNode.id = $fromId MATCH (endNode) WHERE elementId(endNode) = $toId MERGE (startNode)<-[relProps:`REL`]-(endNode) RETURN id(relProps) AS __elementId__>
[ERROR] CypherGeneratorTest.shouldCreateRelationshipCreationQueryWithoutUsingInternalIds:99 expected: <MATCH (startNode) WHERE id(startNode) = $fromId MATCH (endNode) WHERE elementId(endNode) = $toId MERGE (startNode)<-[relProps:`REL`]-(endNode) RETURN elementId(relProps) AS __elementId__> but was: <MATCH (startNode) WHERE id(startNode) = $fromId MATCH (endNode) WHERE elementId(endNode) = $toId MERGE (startNode)<-[relProps:`REL`]-(endNode) RETURN id(relProps) AS __elementId__>
@meistermeier do you have any ideas what can be wrong
We will look at this, but right now we are a bit time constrained.
Your branch doesn't even compile:
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.366 s
[INFO] Finished at: 2024年10月10日T09:26:28+02:00
[INFO] ------------------------------------------------------------------------
[INFO] 10 goals, 10 executed
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.12.1:compile (java-compile) on project spring-data-neo4j: Compilation failure: Compilation failure:
[ERROR] /Users/msimons/Projects/spring-projects/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/repository/query/StringBasedNeo4jQuery.java:[163,54] error: incompatible types: ValueExpressionQueryRewriter cannot be converted to EvaluatingValueExpressionQueryRewriter
[ERROR] /Users/msimons/Projects/spring-projects/spring-data-neo4j/src/main/java/org/springframework/data/neo4j/repository/query/ReactiveStringBasedNeo4jQuery.java:[121,54] error: incompatible types: ValueExpressionQueryRewriter cannot be converted to EvaluatingValueExpressionQueryRewriter
🤷
Build issues were introduced because or CI was broken and we weren't able to publish snapshots for commons. 9e80388 points now to proper snapshots.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thank you!
Now it is no longer evaluated as variable. See #2956
fixes #2954