Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
michael-simons merged 5 commits into main from issue/2954
Oct 10, 2024

Conversation

Copy link
Contributor

@marcingrzejszczak marcingrzejszczak commented Oct 9, 2024

fixes #2954

Copy link
Contributor Author

marcingrzejszczak commented Oct 9, 2024
edited
Loading

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

@michael-simons michael-simons removed their request for review October 9, 2024 10:52
Copy link
Collaborator

We will look at this, but right now we are a bit time constrained.

Copy link
Collaborator

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

🤷

Copy link
Member

mp911de commented Oct 10, 2024

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.

michael-simons reacted with thumbs up emoji

@michael-simons michael-simons requested review from michael-simons and removed request for meistermeier October 10, 2024 15:57
Copy link
Collaborator

@michael-simons michael-simons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thank you!

@michael-simons michael-simons merged commit 359e248 into main Oct 10, 2024
1 check passed
@mp911de mp911de deleted the issue/2954 branch October 11, 2024 07:56
mp911de added a commit that referenced this pull request Oct 17, 2024
Now it is no longer evaluated as variable.
See #2956 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@michael-simons michael-simons michael-simons approved these changes

Assignees
No one assigned
Labels
type: enhancement A general enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add support for value expressions in repository query methods

AltStyle によって変換されたページ (->オリジナル) /