继承映射中的java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: person is not mapped [FROM person]

继承映射中查询对象的过程中报错:

java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: person is not mapped [FROM  person]

HQL查询的是持久化类名而不是表名,

List<Person> persons=session.createQuery("FROM  person").list();

所以应该改为from Person


上一篇:js截取url的参数(转自。。)


下一篇:java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: student is not mapped