Skip to content

Review configuration options for Spring Data Neo4j #21031

@steffen-harbich-cognitum

Description

Neo4j OGM allows to configure "use-strict-querying", see neo4j/neo4j-ogm#651. For now, there is no easy way to configure this option using Spring Boot. It would be nice to have a property "spring.data.neo4j.use-strict-querying" as implemented for other properties like uri, username, password or auto-index. See Neo4jDataAutoConfiguration and Neo4jProperties.

There are also other properties I would like to see easily configurable, for example "useNativeTypes". See org.neo4j.ogm.config.Configuration.Builder for what's currently available.

Workaround/hack using reflection:

@Bean
public SessionFactory sessionFactory(org.neo4j.ogm.config.Configuration configuration) 
        throws IllegalAccessException {

    FieldUtils.writeDeclaredField(configuration, "useStrictQuerying", Boolean.TRUE, true);

    SessionFactory sessionFactory = new SessionFactory(configuration, "com.example");
    return sessionFactory;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions