Skip to content
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

startStatement() should not be required in Neo4jItemReader #113

Open
hadiyarajesh opened this issue May 24, 2022 · 1 comment
Open

startStatement() should not be required in Neo4jItemReader #113

hadiyarajesh opened this issue May 24, 2022 · 1 comment

Comments

@hadiyarajesh
Copy link

Bug description
In Neo4jItemReaderBuilder, startStatement(String startStatement) is required, but Neo4j itself deprecated the START statement and throw error when used. If not used, application will throw BeanCreationException with message java.lang.IllegalArgumentException: startStatement is required.

Environment
Spring Boot: 2.7.0
Kotlin: 1.6.10
Neo4j: 4.4.4

Steps to reproduce

@Bean
    fun postReader(): ItemReader<Post> {
        return Neo4jItemReaderBuilder<Post>()
            .name("postReader")
            .sessionFactory(getSessionFactory())
            .startStatement("")
            .matchStatement("(p:Post)")
            .returnStatement("p")
            .targetType(Post::class.java)
            .pageSize(1000)
            .build()
    }

Expected behavior
startStatement() should be optional, not mandatory.

@fmbenhassine
Copy link
Contributor

Neo4jItemReader was deprecated v5.0 in favor of the item reader from https://github.com/spring-projects/spring-batch-extensions/blob/main/spring-batch-neo4j. I will transfer this issue to the tracker of the extensions repository.

@fmbenhassine fmbenhassine transferred this issue from spring-projects/spring-batch Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants