3

Our project will update to Hibernate 5. We have some databases that are controlled by a 3rd party.

Before Hibernate 5, we used ImprovedNamingStrategy's entity's property ignore strategy if annotation @Column(name="xxxxxx"). xxxxxx maps to the database name.

However, In Hibernate 5, PhysicalNamingStrategy will apply strategy on all logical column name, ignoring the annotation. Hibernate 5 should view xxxxxx as logical column name.

Is there a way to make Hibernate 5 ignore apply strategy on annotated properties?

Kees de Kooter
  • 7,078
  • 5
  • 38
  • 45
Cheng
  • 316
  • 3
  • 9

1 Answers1

0

If you configure Hibernate to use PhysicalNamingStrategyStandardImpl it should work as expected, i.e. @Column(name="xxxx") annotations take precedence.

hibernate.physical_naming_strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Kees de Kooter
  • 7,078
  • 5
  • 38
  • 45