首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

hernate 中HQL的一个小疑点

2012-10-19 
hernate 中HQL的一个小问题??//String hqlfrom SyOrg as org where org.porgNo???String hqlfrom S

hernate 中HQL的一个小问题

?

?

//String hql="from SyOrg as org where org.porgNo=?";
??String hql="from SyOrg where porgNo=?";

List<SyOrg> orgList= this.getHibernateTemplate().find(hql, orgNo);

?

?

上面都可以通过。

?

但String hql="from SyOrg where SyOrg.porgNo=?";则会出现下面错误.

org.springframework.orm.hibernate3.HibernateQueryException: Unable to resolve path [SyOrg.porgNo], unexpected token [SyOrg] [from com.test.pojo.SyOrg where SyOrg.porgNo=?];

?

热点排行