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=?];
?