hibernate的两个问题
初学hibernate,很多问题需要了解,希望各位多帮忙
1,StringBuffer hqlbf = new StringBuffer();
.append("select chlp.lineno, chlp.acid, chlp.txdate, chlp.valuedate, chlp.txmnemonic, chlp.txdescription, chlp.actualpayamt, chlp.intrate,");
.append("chlp.baldate, chlp.balbf, chlp.balcf, chlp.availbal, chlp.txnarrative,");
hqlbf
.append("cfile.definitionno, cfile.definitiondesc, cfile.createdate, cfile.filetype, cfile.version,chlp.accountid");
hqlbf
.append(" from CpsPaymentPO cppo, CpsHexagonLogPO chlp, CpsFileattrPO cfile");
.append(" where cppo.merchref=chlp.merchref and cppo.bankcode=:bankcode and cppo.status=:status and chlp.fileid=cfile.fileid and cfile.createdate>=:begindate and cfile.createdate<:enddate");
hqlbf
.append(" and to_number(cfile.version)=(select max(to_number(cfile.version)) from CpsPaymentPO cppo, CpsHexagonLogPO chlp, CpsFileattrPO cfile where cppo.merchref=chlp.merchref and cppo.bankcode=:bankcode and cppo.status=:status and chlp.fileid=cfile.fileid and cfile.createdate>=:begindate and cfile.createdate<:enddate)");
我上面的这段代码用 Query一执行查询就出错,因为里面用了oracle的to_number()函数,不知HQL是否有把字符串转化为数字的函数,或者应该如何解决
2,hibernate里面是否默认就有连接池机智,我们的项目没有自己配,是否需要自己配。我们用的是hibernate3.0
请大家多帮新人。多分重谢!msn:ymiao@itsz.cn