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.
Hibernate copied the CamelCaseToUnderscoresNamingStrategy from Spring.
Just use it like this, without defining it again.
quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With