Skip to content

Springboot: Unable to disable Javers Global Id Cache #878

@duane-staehli

Description

@duane-staehli

When using SpringBoot the JaversSqlAutoConfiguration sets up the "javersSqlRepository" bean. It uses the builder but it does not expose a way to call "withGlobalIdCacheDisabled()".

    @Bean(name = "JaversSqlRepositoryFromStarter")
    @ConditionalOnMissingBean
    public JaversSqlRepository javersSqlRepository(ConnectionProvider connectionProvider) {
        return SqlRepositoryBuilder
                .sqlRepository()
                .withSchema(javersSqlProperties.getSqlSchema())
                .withConnectionProvider(connectionProvider)
                .withDialect(javersSqlDialectName())
                .withSchemaManagementEnabled(javersSqlProperties.isSqlSchemaManagementEnabled())
                .build();
    }

Could you please add the "disable global id cache" property to "JaversSqlProperties" and then honor it in the bean builder.

My work around was to over the bean and add the additional method call in the builder but that isn't very good from a Javer's upgrade path for the applications. Since now I'm tied to ensuring I check that code before upgrade and add any additional changes that might have been made in the builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions