springboot:hibinate_5_ignore_table_column_name_in_entity

Hibinate 5 Ignore @Table, @column Name in Entity?

The short answer is Yes. It do it by default.

But you can still use the old way. If you want to old behaviors, to use @Table (name = “XxxXxxXxx”) for your Entity, or @Column(name = “YyyYyyYyy”) for your field variables, you need to add the following two lines in your application.properties

spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
  • springboot/hibinate_5_ignore_table_column_name_in_entity.txt
  • Last modified: 2020/10/23 08:43
  • by chongtin