最近在弄自己的毕业设计,遇到了一点问题,想请教一下大家,问题如下
1.org.hibernate.exception.SQLGrammarException: could not execute query
提示我说我的action中的,showAllSturecord方法有错误,我所做的是一个分页显示自己的记录列表,
totalCount = stuManager.showAllSturecord(sid).size();
totalCount是我定义的总记录条数,sid为两个表连接的外键,实现类中的方法如下
/**
- 我的所有记录列表 */ public List showAllSturecord(int sid) { Query query = this.getSession().createQuery("from Sturecord sr " + "join fetch sr.student where sr.student.sid =sid"); return query.list(); } 这时告诉我没有明确定义列,这是为啥呢?根据sid到Sturecord表中查出符合sid的所有记录,难道不对么~ 请大家帮忙看看,挺急的!!!谢谢大家了