Reputation: 206
OK, I'm trying to connect my SpringBoot application via JPA (Hibernate) to a legacy AS/400 DB database. The table names however have a "." (Period) in them. ex: LE.ONFP is the table name. Hibernate however is converting the period to an underscore which causes an error because there is not table called "le_onfp".
@Entity
@Table(name = "\"LE.OFNP\"", schema = "QS36F")
Here is my annotations at the beginning of my Entity class.
Upvotes: 1
Views: 2153
Reputation: 206
adding the following line to my application.properties files fixed my issue.
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
and keeping my annotation the same.
@Table(name = "\"LE.OFNP\"", schema = "QS36F")
Upvotes: 5