'Spring boot application and hibernate are using different naming strategies

This is very strange.

I am using the spring.jpa.generate-ddl=true to create the tables in my database. When spring does this, the table names are snake case. For example, the table for MyClass becomes my_class.

Next, I exported the schema from Hibernate using this code: Export schema from Hibernate

When I call the code, the resulting sql has table names in camel case with the first letter capitalized. So, the table for MyClass is MyClass.

Why would they generate differently? How do I get them to be the same?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source