I use JPA for database access and annotated every column with the correct name. Now if I execute a query (e.g. findAll()) it returns
Unknown co
@Column(name = "PersonFullName")
private String PersonFullName;
to the database table column name "PersonFullName" without the underscore.
The below worked for me. Add this in the application settings and then use @Column to specify the physical database column name for the model's property.
@Column(name = "PersonFullName")
In 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