继承映射中查询对象的过程中报错:
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
2022-09-27 20:44:04
继承映射中查询对象的过程中报错:
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