0

I am using spring-data-jpa for my project, it handles creating the database, when i was working on my machine which is windows everything was fine, but when deploying to linux machine the application broke saying table could not be found

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'sframele_levelsDB.Store' doesn't exist

table name is case sensitive in linux machines and for some reason even I am specifying in my entity the table name to be lowercase jpa is looking for Store not store

@Entity
@Table(name="store")
public class Store {

I tried to change the name to Store

@Entity
@Table(name="Store")
public class Store {

but the created table still lowercase, i tried several naming strategies but did not work

  spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy

also tried

 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

Any help is appreciated

Amer Qarabsa
  • 6,412
  • 3
  • 20
  • 43
  • 1
    `spring.jpa.hibernate.naming.implicit-strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy` `spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy` ? – Cepr0 Aug 24 '17 at 19:19

1 Answers1

0

Use

@Table(name="`Store`")

instead.

Grim
  • 1,938
  • 10
  • 56
  • 123