用的hibernate版本是3。运行环境是jboss4+ejb2。
问题描述:普通的HQL没问题,通过执行executeSQLQuery,比如对应的SQL是
select c.xx1,c.xx2,a.xx1 from c,a on c.id = a.id
正常返回是Object[],这个Object[]长度为3.
真实问题是:返回的是Object[],但是长度为0,直接抓狂。。。。。。
hibernate.cfg.xml:
HibernateSessionFactory
<!-- org.hibernate.hql.classic.ClassicQueryTranslatorFactory -->
java:jdbc/oracle
false
org.hibernate.dialect.OracleDialect
org.hibernate.transaction.JBossTransactionManagerLookup
org.hibernate.transaction.CMTTransactionFactory
50
50
<property name="hibernate.transaction.auto_close_session">true</property>
<property name="hibernate.transaction.flush_before_completion">false</property>
<property name="hibernate.connection.release_mode">auto</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>