Thomas B. (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6099013...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOTlkNmM4ZjBl...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16681?atlOrigin=eyJpIjoiOTlkNm...
) HHH-16681 (
https://hibernate.atlassian.net/browse/HHH-16681?atlOrigin=eyJpIjoiOTlkNm...
) Can't disable global temporary table creation (
https://hibernate.atlassian.net/browse/HHH-16681?atlOrigin=eyJpIjoiOTlkNm...
)
Issue Type: Bug Affects Versions: 6.1.7 Assignee: Unassigned Components: hibernate-core
Created: 24/May/2023 01:04 AM Environment: Hibernate 6.1.7.Final
Spring Boot 3.0.6 Priority: Major Reporter: Thomas B. (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6099013...
)
Hibernate creates temporary tables for bulk operations.
We're using Oracle ( v19.0.0.0.0 ) and our user won't have the privilege to create
temporary table.
I've tried a lot of different configurations, but HTE_ tables are still created at
startup :
09:07:43.658 INFO [com.zaxxer.hikari.HikariDataSource ] HikariPool-1 - Starting...
09:07:44.285 INFO [com.zaxxer.hikari.pool.HikariPool ] HikariPool-1 - Added
connection oracle.jdbc.driver.T4CConnection@6dc5e857
09:07:44.286 INFO [com.zaxxer.hikari.HikariDataSource ] HikariPool-1 - Start
completed.
09:07:44.596 INFO [SQL dialect ] HHH000400: Using dialect:
org.hibernate.dialect.Oracle12cDialect
Hibernate: create global temporary table HTE_xxxxx(...) on commit delete rows
Hibernate: create global temporary table HTE_yyyyy(...) on commit delete rows
09:07:45.551 INFO [j.LocalContainerEntityManagerFactoryBean] Initialized JPA
EntityManagerFactory for persistence unit 'default'
Here is the properties I’ve tried :
spring.jpa.properties.hibernate.query.mutation_strategy=org.hibernate.query.sqm.mutation.internal.inline.InlineMutationStrategy
spring.jpa.properties.hibernate.hql.bulk_id_strategy.persistent.create_tables=false
spring.jpa.properties.hibernate.hql.bulk_id_strategy.persistent.drop_tables=false
spring.jpa.properties.hibernate.hql.bulk_id_strategy.global_temporary.create_tables=false
spring.jpa.properties.hibernate.hql.bulk_id_strategy.global_temporary.drop_tables=false
I can’t find a spring.jpa.properties.hibernate.query.insert_strategy that is working
because it gives me an exception :
Cannot instantiate the class
[org.hibernate.query.sqm.mutation.internal.temptable.LocalTemporaryTableMutationStrategy]
because it does not have a constructor that accepts a dialect or an empty constructor
I didn’t find anything more to try, according to the documentation :
https://docs.jboss.org/hibernate/orm/6.1/userguide/html_single/Hibernate_...
I also tried to find some help on StackOverflow (
https://stackoverflow.com/questions/76312361/hibernate-6-1-x-spring-boot-...
) , without succcess.
(
https://hibernate.atlassian.net/browse/HHH-16681#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16681#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:2b972a1 )