Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set hibernate.id.new_generator_mappings in application.yaml

I am trying to set the hibernate.id.new_generator_mappings property in order to use SequenceStyleGenerator, as I'm getting deprecation warnings for SequenceHiLoGenerator after upgrading to Spring Boot 1.4.0.RELEASE.

I tried adding the following entry to application.yaml but it has no effect:

spring:
  jpa:
    hibernate:
      id:
        new_generator_mappings: true

I also tried converting to application.properties file:

spring.jpa.hibernate.id.new_generator_mappings=true

Stepping through the JpaProperties class I can see where it's trying to parse the hibernate.id.new_generator_mappings property, but it is missing.

Is this a bug in Spring Boot, or do I have something configured incorrectly?

like image 252
NTyler Avatar asked Aug 03 '16 17:08

NTyler


1 Answers

The correct setting, per the upgrade guide is:

spring.jpa.hibernate.use-new-id-generator-mappings

like image 102
NTyler Avatar answered Oct 06 '22 13:10

NTyler