String hql = "select new cn.ahut.qige.bean.TDI1QueryResult(t.tid,t.title,u.username as author," +"t.time as posttime,t.replys) from Topic t,User u where t.authorid=u.id ";
String hql2 = "select new cn.ahut.qige.bean.TDI2QueryResult(topicid,u.username as lastreplyer,r1.time as lastreplytime) from Reply r1,Topic t,User u where r1.authorid=u.id and t.tid=r1.topicid " +" and r1.time>=all(select r2.time from Reply r2 where r1.topicid=r2.topicid)";
两个hql语句都在同一个action中通过调用this.getHibernateTemplate().find(hql)获取list
在mysql中执行都没有问题,放到java中作了相应的修改,第一个执行成功,第二个就报了空指针异常。是不是一个action中,不能使用this.getHibernateTemplate().find(hql)多次?还是其他原因?求大神帮忙啊
String hql2 = "select new cn.ahut.qige.bean.TDI2QueryResult(topicid,u.username as lastreplyer,r1.time as lastreplytime) from Reply r1,Topic t,User u where r1.authorid=u.id and t.tid=r1.topicid " +" and r1.time>=all(select r2.time from Reply r2 where r1.topicid=r2.topicid)";
两个hql语句都在同一个action中通过调用this.getHibernateTemplate().find(hql)获取list
在mysql中执行都没有问题,放到java中作了相应的修改,第一个执行成功,第二个就报了空指针异常。是不是一个action中,不能使用this.getHibernateTemplate().find(hql)多次?还是其他原因?求大神帮忙啊