Re: HSQLDB 2.6.1, Hibernate 5.4.30.Final, DDL statements reapplied at every restart

Fred Toussi via Hsqldb-user <[email protected]> Sun, 07 Nov 2021 13:01:31 +0000
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <[email protected]>
You should always use the Hibernate HSQLDB dialect. The sql.syntax_pgs=true allows some non-standard features of PostgreSQL in CREATE TABLE and SELECT statements..

You can also remove these 2 settings which may affect the interaction with Hibernate: close_result=true;shutdown=true

On Sun, Nov 7, 2021, at 12:29, Andrea Spacca wrote:
>> Try without the hbm2ddl setting for Hibernate, and without 
> sql.lowercase_ident=true for HSQLDB.
>
> same behaviour.
>
> I've also deleted the hsqldb files to be sure no previous settings were 
> affecting the test.
>
> btw, should I use PostgreSQLDialect if I set "sql.syntax_pgs=true"?
>
> (not that it did any difference for the specific problem)
>
>
>
> Il 07/11/21 12:34, Andrea Spacca ha scritto:
>> Thanks for the prompt feedback.
>> 
>> I've already tried different settings for hbm2ddl auto configuration.
>> 
>> If I got it right I should set it to "update": at every restart if there 
>> any changes in the models they will applied, otherwise not.
>> 
>> Still it tries to reapply every DDL statement as for creation even with 
>> this value or any other value I set (including "none" or not setting 
>> anything).
>> 
>> Btw, I tried the same application with H2 embedded in postgres mode and 
>> no hdm2ddl settings and I didn't face the same issue.
>> 
>> So I'd assume it is a problem on the HSQLDB side, not on hibernate. Do I 
>> miss anything?
>> 
>> Thanks
>> 
>> 
>>  > Hibernate is covered extensively at StackOverflow. For example:
>> 
>>  > 
>> https://stackoverflow.com/questions/438146/what-are-the-possible-values-of-the-hibernate-hbm2ddl-auto-configuration-and-wha/1689769#1689769 
>> 
>> 
>>  > Regarding your HSQLDB settings, see if you really need
>>  > sql.lowercase_ident=true. This setting is only necessary if you are
>>  > using a database access library that assumes (like PostgreSQL) column
>>  > names in ResultSet are lowercase.
>> 
>>  > Fred
>
>
> _______________________________________________
> Hsqldb-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user