org.hibernate.hql.ast.QuerySyntaxException: XXX is not mapped

因为 String sql2 = "select s from Student s where s.clazz.name=:name";

此处的 Student 应该为类名。hql语法里面是POJO对象而不是table

posted @ 2015-12-30 12:24  木易·月  阅读(812)  评论(0编辑  收藏  举报