Skip to content

Bump spring-boot-starter-parent from 3.3.5 to 3.4.0 #161

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
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spring-batch-neo4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.5</version>
<version>3.4.0</version>
<relativePath/>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.neo4j.cypherdsl.core.Cypher;
import org.neo4j.cypherdsl.core.Functions;
import org.neo4j.driver.Driver;
import org.neo4j.driver.ExecutableQuery;
import org.springframework.batch.extensions.neo4j.Neo4jItemWriter;
Expand Down Expand Up @@ -83,7 +82,7 @@ public void testBasicDelete() {
IdDescription idDescription = mock(IdDescription.class);
ExecutableQuery executableQuery = mock(ExecutableQuery.class);
when(identifierAccessor.getRequiredIdentifier()).thenReturn("someId");
when(idDescription.asIdExpression(anyString())).thenReturn(Functions.id(Cypher.anyNode()));
when(idDescription.asIdExpression(anyString())).thenReturn(Cypher.anyNode().elementId());
Comment on lines -86 to +85
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here, I had to find an alternative to Functions.id because it was no longer accessible with the Neo4J version that Spring Boot is now pulling, but I have to admit I didn't go after all the details.

Is this related to what you just mentioned, @meistermeier? Anything you would do differently?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, it is from a product perspective very different. The elementId is a complete new (internal) field introduced in Neo4j 5 as a replacement for the id.
From a dependency perspective the update might have pulled in new major version of the Cypher DSL (sorry that I have missed this) where we tried to unify the entry point to Cypher.... for operations and functions.
The only difference, if users don't specify the right Neo4j dialect for the CypherDSL (Neo4j_5) is that the elementId function will create a fallback to toString(id(node)) (no index) instead of elementId(node) (index support) in the resulting Cypher statement.
It's ok with me because a) we should really switch to elementId and b) it is documented in the CypherDSL. (https://neo4j.github.io/cypher-dsl/2024.2.0/#dialect-support)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the explanation, @meistermeier! I wait then for your formal approval before merging these changes 🙂

when(executableQuery.withParameters(any())).thenReturn(executableQuery);
when(persistentEntity.getIdentifierAccessor(any())).thenReturn(identifierAccessor);
when(persistentEntity.getPrimaryLabel()).thenReturn("SomeLabel");
Expand Down