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
\n
\n
故不积跬步,无以致千里
因为 String sql2 = "select s from Student s where s.clazz.name=:name";
此处的 Student 应该为类名。hql语法里面是POJO对象而不是table