Issue
I have Java entities with a composite camel case name, e.g., EmployeeProject
.
I need to map those entities on tables with snake case names, e.g., employee_project
, instead of the default used by Quarkus/Panache, e.g., employeeproject
.
I know I can set a custom table name with @Entity(name = "employee_project")
but I was wondering if there is some sort of application property which do the same work for me.
Solution
You can create a custom naming strategy for this purpose. Also see the following article which has an example for this very use case: https://thorben-janssen.com/naming-strategies-in-hibernate-5/#Names_in_snake_case_instead_of_camel_case
Answered By - Christian Beikov
Answer Checked By - Senaida (JavaFixing Volunteer)