When I am defining my model as -
@Entity @Table public class User{ @Id @NotNull private String employeeId; } I am getting this error -
Caused by: org.postgresql.util.PSQLException: ERROR: column user0_.employeeid does not exist
but when I am using this -
@Entity @Table(name = "`User`") public class User{ @Id @NotNull @Column(name = "`employeeId`") private String employeeId; } In my application.yml -
spring: jpa: hibernate: naming: physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl ddl-auto: update database-platform: org.hibernate.dialect.PostgreSQLDialect datasource: url: ${db.host} username: ${db.user} password: ${db.password} Why I am getting error in first one ? I don't want to specifically tell the names, spring boot jpa should automatically find the table and column by naming.
My tables and columns are same as my naming of entity and column, I don't want to change in the name, that's why I am using PhysicalNamingStrategyStandardImpl
What's wrong with 1st one ?
hibernate.globally_quoted_identifiersproperty ?user0_.employeeidbut it should beuser0_.employeeIdit is coveting it two lowecasetrueand now its working !! Thank you ! You can post it as answer