今天在做ssh查询的时候出现
could not locate named parameter
这个错误,String hql = "from AbForCastActive a where a.appId=:appId and a.activeState=:activeState and a.activeStartTime>date";
Map params = new HashMap();
params.put("appId", appId);
params.put("activeState", activeState);
params.put("activeStartTime", date);
return find(hql, params);
我犯了俩个错误
1:a.activeStartTime>date改为a.activeStartTime>:date
2:params.put("activeStartTime", date);改为params.put("date", date);