为什么hibernate在插入和删除操作期间生成'T_'前缀tableName? [英] Why hibernate generates 'T_' prefix tableName during insert and delete operation?
问题描述
数据库:ORACLE
我们正在使用ImprovedNamingStrategy for hibernate和hbm文件,
但是,在删除和插入操作期间,它生成'T_'作为前缀,'HT_'作为前缀生成一些表。
这导致SQLGrammarException:
org.hibernate.exception.SQLGrammarException:无法执行语句
请注意,这是发生在使用Oracle数据库时,它不会发生在HSQL或Postgres。
你正在运行一些批量操作,这是临时表。这是一个主题在官方的Hibernate论坛,很可能同样的问题。这里是一个文章,解释,为什么这个表
解决方法是避免大量操作或只是让Hibernate创建这个临时表。
Database: ORACLE
We are using ImprovedNamingStrategy for hibernate and in hbm file, we are giving table name explicitly.
But, still, during delete and insert operations, it is generating 'T_' as prefix and 'HT_' as prefix against some tables.
This is resulting in SQLGrammarException:
org.hibernate.exception.SQLGrammarException: could not execute statement
Please note that this is happening while using Oracle database, it is not happening with HSQL or Postgres.
It seems that you're running some bulk-operations and this are temporary tables. Here is a topic at the official Hibernate forum with most likely the same problem. And here is an article, explaining, why this tables are needed.
And the workaround is to avoid bulk-operations or just let Hibernate create this temporary tables.
这篇关于为什么hibernate在插入和删除操作期间生成'T_'前缀tableName?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!