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

Hibernate报错,急!
org.springframework.orm.hibernate3.HibernateQueryException:   undefined   alias:   postdate   [select   postdate   from   com.laoer.blog.bean.Article   where   blogid   =   ?   group   by   postdate];   nested   exception   is   org.hibernate.QueryException:   undefined   alias:
postdate   [select   postdate   from   com.laoer.blog.bean.Article   where   blogid   =   ?   group   by   postdate]
org.hibernate.QueryException:   undefined   alias:   postdate   [select   postdate   from   com.laoer.blog.bean.Article   where   blogid   =   ?   group   by   postdate]
我用的是struts+spring+hibernate,错误怎么也调不出来了,大家帮帮忙吧!

------解决方案--------------------
帮顶!
------解决方案--------------------
HQL语句的问题,应该这样
from com.laoer.blog.bean.Article a where a.blogid = ? group by a.postdate