Skip to main content
5 of 5
edited tags
Jens Schauder
  • 82.6k
  • 35
  • 199
  • 379

Entity Class name is transformed into SQL table name with underscores

I have the following entity defined:

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

Despite the table annotation, I receive java.sql.SQLException: Invalid object name 'email_template'. How can I prevent an entity class such as EmailTemplate being transformed into email_template table name?

Edit:

I'm using Spring Boot: start JPA. From my build.gradle file,

compile("org.springframework.boot:spring-boot-starter-data-jpa") 
James
  • 3.2k
  • 21
  • 82
  • 131