Hibernate and Firebird – Support for Temporary Tables

by Philip Barlow / from beautifuldecay.com

I had problems to use Hibernate(JPA) to work with Firebird a while ago. Every connection opened was not being closed, I couldn’t ever think to use a pool of connection in my web service and the temporary tables was being created next to other tables. In this post, I will focus on the problem with temporary tables.

Hibernate creates temporary tables in other databases too but there is a specifically problem with Firebird. After sometime (after a lot of websites), I figured out that the Hibernate dialect for Firebird doesn’t know about global temporary tables, so it creates them as normal tables instead.

So, the solution for this problem is implement a class that will deal with the Dialect and in this class take control the creation of the temporary tables.

In the persistence.xml add this attribute that references our new class:

Anúncios

2 comentários em “Hibernate and Firebird – Support for Temporary Tables

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s