|
select distinct(bulletin.newsId),bulletin.newsCategoryId,bulletin.newsType,bulletin.newsTitle,to_char(bulletin.newsContent),bulletin.publishTime,bulletin.beginTime,bulletin.endTime,bulletin.updatetime,bulletin.newsStatus,bulletin.priority,bulletin.userid,bulletin.FGroupcode,gr.id.FGroupname,bulletin.createtime,
(case bulletin.newsStatus when (bulletin.newsStatus = '2' and to_char(bulletin.beginTime,'YYYY-MM-dd') > '2008-09-21' ) then 5 when (bulletin.newsStatus = '2' and to_char(bulletin.endTime,'YYYY-MM-dd') < '2008-09-21' ) then 6 else bulletin.newsStatus end) as Status
from Bulletin as bulletin left join bulletin.newsPop as pop ,Group as gr where gr.id.FGroupcode = bulletin.FGroupcode order by bulletin.priority desc ,bulletin.createtime desc,bulletin.newsId desc,bulletin.FGroupcode
这个hibernate 语句加上了case when 就报:
Caused by: java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based!
请帮忙看看,谢谢!!! |
|