DB2 Hibernate temporary tables cannot be accessed

Solution Verified - Updated -

Issue

  • How can we ensure temporary tables are available during statement execution when required?
  • Currently facing problems with Hibernate 5 accessing temporary DB2 tables 1. These tables are used internally by hibernate e.g. in the context of entity deletion (using a mechanism called MultiTableBulkIdStrategy which is implemented by GlobalTemporaryTableBulkIdStrategy in the Hibernate DB2Dialect)
    While this works with Hibernate 4 and our application, the temporary tables cannot be accessed with Hibernate 5.
    Instead of accessing the temporary tables, table names are prefixed with SESSION.HT_, Hibernate 5 tries to access "real" schema tables which of course does not work, as these tables (as well as the schema SESSION) do not exist.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.0.6, 7.0.5, 7.0.4, 7.0.3, 7.0.2, 7.0.1, 7.0.0
    • Migration from EAP 6.4.x
    • Migration from Hibernate 4 to 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content