HSQLDB: case sensitive table names

Viewed 333

I have the following jpa/hibernate/hsqldb configuration:

  • JPA ddl-auto: create-drop
  • Hibernate entities have no @Table annotation and created with SpringPhysicalNamingStrategy. So, PersonalData entity table name is personal_data. Hibernate creates them due to running the application
  • hsql DB URL is jdbc:hsqldb:mem:testdb;sql.syntax_pgs=true

My problem is when I try to select due spring repositories with the hsql there is the error about non-existing PERSONAL_DATA table.

I found that this is SQL notation to use CASE_SENSETIVE tables and hqsl follows that. To resolve that developers offer quote table names in sql.

So, I have 2 unlikely ideas

  • Add @Table annotation to entities.
  • Override SpringPhysicalNamingStrategy

Is there a way to use a simple property?

0 Answers
Related