Skip to content

startStatement() should not be required in Neo4jItemReader #113

Open
@hadiyarajesh

Description

@hadiyarajesh

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions