hibernate错误

a280184441 a280184441 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
String hql ="from TaskInfo as a where a.tno=:tno";
if(term!=null||!"".equals(term)){
hql = "from TaskInfo as a where a.tno=:tno and a.term=:term";
}
Query query = session.createQuery(hql);
System.out.println(user.getTno());
query.setString("tno", user.getTno().trim());
query.setString("term", term);
tx = session.beginTransaction();
result = query.list();
if(!Hibernate.isInitialized(result)){
Hibernate.initialize(result);
}
tx.commit();



后台报错
org.hibernate.QueryException: could not resolve property: tno of: com.ORM.TaskInfo [from com.ORM.TaskInfo as a where a.tno=:tno and a.term=:term]

是什么错误?
...全文
评论 3
收藏 已收藏
分享
返回顶部
a280184441
Web 开发 81,107 成员 341,720 内容