org.springframework.orm.hibernate3.HibernateQueryException: teacherscore is not mapped

来源:互联网 发布:优化网站实例 编辑:程序博客网 时间:2024/06/04 19:58

真是恨死它了,烦半天!!!!

开始还以为配置出错了找了半天teacherscore .hbm.xml没错,dao也没错,起初不停地部署运行然后在dao里面测试,还好找到问题了,是出现在hql语句上!!!!!


public List<Teacherscore> findAll() {
String queryString = "from teacherscore";
return (List<Teacherscore>)hibernateTemplate.find(queryString);
}



public static void main(String[] args) throws Exception {
ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
TeacherscoreDAO dao = (TeacherscoreDAO)ac.getBean("teacherscoreDAO");
System.out.println("00");
List<Teacherscore> s = dao.findAll();
System.out.println(s);
}


就是出在那个小写的t上改成大写就行了。。。。。。

原创粉丝点击