首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

Hibernate报错,该如何解决

2012-01-24 
Hibernate报错,急!org.springframework.orm.hibernate3.HibernateQueryException:undefinedalias:postdate

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

热点排行