I'm Using DBeaver 24.3.2, SpringBoot 3.4.1, Java 21.0.5, flyway 11.2.0. The persistence library are all inherited from spring-data.
I recently switched to SpringBoot 3.4 and, doing an example project, I noticed a pretty strange behavior. I have the follow flyway and datasource config:
########## DATASOURCE CONFIG ##############
spring.datasource.url=jdbc:h2:file:D:/h2-dbms/rest-api/restapidb;AUTO_SERVER=TRUE;
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=.h2.Driver
spring.h2.console.enabled=true
spring.h2.console.settings.trace=false
spring.h2.console.settings.web-allow-others=false
spring.jpa.database-platform=.hibernate.dialect.H2Dialect
############ FLYWAY CONFIG ################
spring.flyway.user=sa
spring.flyway.password=
spring.flyway.locations=classpath:migration
My ddl
is so easy that it's not even worth writing, there are just two tables in many-to-many relationships.
All works fine but, If I connect to my DB with DBeaver, the first time all seems normal, the second time I see other two table similar to mine (the difference is the prefix HTE_
and a column RN_
type integer):
As you can see the tables ROLES
, USERS
and USERS_ROLES
are correct but I don't know what HTE_USERS
and HTE_ROLES
means.
Another strange thing is that the HTE tables are the same column plus one RN_
(Integer):
What a hell is that?? If I open the DB with the web console at http:/localhost:8080/h2-console (always using file mode and not in-memory) nothing of this happens.
Do you have some idea?
N.B.: I clearly don't use envers or other audit framework.
I'm Using DBeaver 24.3.2, SpringBoot 3.4.1, Java 21.0.5, flyway 11.2.0. The persistence library are all inherited from spring-data.
I recently switched to SpringBoot 3.4 and, doing an example project, I noticed a pretty strange behavior. I have the follow flyway and datasource config:
########## DATASOURCE CONFIG ##############
spring.datasource.url=jdbc:h2:file:D:/h2-dbms/rest-api/restapidb;AUTO_SERVER=TRUE;
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=.h2.Driver
spring.h2.console.enabled=true
spring.h2.console.settings.trace=false
spring.h2.console.settings.web-allow-others=false
spring.jpa.database-platform=.hibernate.dialect.H2Dialect
############ FLYWAY CONFIG ################
spring.flyway.user=sa
spring.flyway.password=
spring.flyway.locations=classpath:migration
My ddl
is so easy that it's not even worth writing, there are just two tables in many-to-many relationships.
All works fine but, If I connect to my DB with DBeaver, the first time all seems normal, the second time I see other two table similar to mine (the difference is the prefix HTE_
and a column RN_
type integer):
As you can see the tables ROLES
, USERS
and USERS_ROLES
are correct but I don't know what HTE_USERS
and HTE_ROLES
means.
Another strange thing is that the HTE tables are the same column plus one RN_
(Integer):
What a hell is that?? If I open the DB with the web console at http:/localhost:8080/h2-console (always using file mode and not in-memory) nothing of this happens.
Do you have some idea?
N.B.: I clearly don't use envers or other audit framework.
Share Improve this question edited Feb 3 at 8:15 CoderJammer asked Feb 2 at 23:20 CoderJammerCoderJammer 7554 gold badges11 silver badges39 bronze badges1 Answer
Reset to default 0Is not an error is a normal behavior by Hibernate creating these temps table if you use sequence with allocationSize
greather than 1.
As they said allocationSize
with value equals to 1 causes lack of performance this is the reasons wy the default is 50.
Anyway starting from Hibernate 6.2.0 CR1 you can disable the creation of these tables with:
hibernate.hql.bulk_id_strategy.global_temporary.create_tables=false
but seems is not a good practice.
more info here.
Hope helps.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745253987a4618844.html
评论列表(0条)