继承映射中查询对象的过程中报错:
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
继承映射中查询对象的过程中报错:
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
转载于:https://www.cnblogs.com/Hdaydayup/p/6505238.html