HQL={select b from Body b,StoryName s where b.storyName=s.storyId and s.storyId=3 and b.chapterId=(select max(chapterId) from Body where b.storyName=s.storyId and s.storyId=3 )} 以上代码是用HQL执行过
我把具体值改成?
调用find(HQL,aa【】)就报错java.util.ArrayList cannot be cast to com.entity.Body
新手没分呀
我把具体值改成?
调用find(HQL,aa【】)就报错java.util.ArrayList cannot be cast to com.entity.Body
新手没分呀
解决方案 »
- 怎么将下面的查询语句转化为Hibernate语句
- sturts2 中的parameters问题
- 新手关于JSP的图片上绘制(类似J2D在窗体上绘制)
- tomcat默认servlet的.class路径是什么~?
- 有关jsp session 的问题,郁闷了好半天,盼大侠帮忙解决!
- 为什么找不到???
- jsp文件上传问题,大家帮忙看看
- Object 的 notify 方法是什么意思
- tomcat下如何配置servlet?(在线等,随时加分)
- 通过<jsp:param name="" value=""/>传中文为什么显示乱码?
- 同时含有out,printwriter的代码,为何输出顺序不一样
- tomcat服务器配置多个域名访问同一个网站
select b from Body b,Story s where b.cheapterId=(select max(b.cheapterId) from Body b,Story s where s.story=? ) 后来我无耻了点 我直接赋值 我就不用max了
int[] aa=new int[2];
int idd=13;
id=3;
aa[0]=id;
aa[1]=idd;
return (Body)this.getHibernateTemplate().find("select b from Body b,StoryName s where s.storyId=? and b.chapterId=?",aa);
网页是用实体body点出2条属性值(不在关联之列)
java.lang.NumberFormatException: null
我试过 List li=null;
li.add();
报错 java.lang.NumberFormatException: null