Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I modify HSQL default schema?

I am creating HSQL memory db using Hibernate. The connection URL in Hibernate config file looks like this

<property name="connection.url">jdbc:hsqldb:mem:mock_db</property>

The default name of schema is Public. Suppose I want to change that to TEST I have tried this but it didn't change the name of schema.

<property name="hibernate.default_schema">TEST</property>

Do you guys know how I could do this? It would be convenient if I could do this in hibernate configuration file.

Thank in advance.

like image 988
codereviewanskquestions Avatar asked Nov 03 '22 00:11

codereviewanskquestions


1 Answers

Old - To be used for clients written before HSQLDB schema support:

<property name="connection.url">jdbc:hsqldb:mem:mock_db;default_schema=XXX</property>

New - Users may change their base default schema name with the comand:

SET INITIAL SCHEMA <schemaname>;
like image 136
aholub7x Avatar answered Nov 28 '22 19:11

aholub7x