|
DB2 regards "simple" as a keyword, so with hibernate.auto_quote_keyword=true, the table generated for entity Simple will be auto-quoted.
org.hibernate.test.legacy.SQLLoaderTest has an entity named Simple. The following tests create native SQL queries involving Simple, which fail using DB2 because the resulting SQL does not have the table name auto-quoted:
#testFindBySQLStar {{session.createSQLQuery( "select {simple.*}
from Simple {simple}
" ).addEntity( "simple", Simple.class ).list();}}
#testTS {{session.createSQLQuery( "select {sim.*}
from Simple {sim} where {sim}
.date_ = ?" ).addEntity( "sim", Simple.class )}}
|