日期:2014-05-20  浏览次数:20751 次

麻烦高手帮我看下,关于几张表的hql查询语句
select * from t_zb_report r, t_zb_check c, t_pz_evaluate e where e.evacode=r.evacode and r.id=c.schedualid and c.checkstatus='Y'
这条语句在plsql下能查询
而在JAVA语句中换成hql
from TZbCheck c, TZbReport r, TZbEvaulpe e where e.evacode=r.evacode and r.id=c.schedualid and c.checkstatus='Y'
就报错了:could not resolve property: evacode of: com.company.busi.tzbreport.entity.TZbReport [from com.company.busi.tpzevaluate.entity.TPzEvaluate as e, com.company.busi.tzbcheck.entity.TZbCheck as c, com.company.busi.tzbreport.entity.TZbReport as r where 1=1 and e.evatype ='2' and e.evacode=r.evacode and r.id=c.schedualid and c.checkstatus='Y' and year=? and evaluateTree.id=? and (leveltype=? or islast='1') order by sort];
麻烦高手帮我看下。。。

------解决方案--------------------
估计你hsql中的属性checkstatus 要换成checkStatus schedualid 在换成schedualId 仔细对照属性。
------解决方案--------------------
仔细对照属性。