错误信息如下:org.hibernate.hql.internal.ast.QuerySyntaxException: person is not mapped [select p from person p where p.name = :name and p.address = :address]
在练习Springdata JPA时,@Query注解
这里要注意的是注解中写的算是HQL,所以查询的是对象,而不是表名,此处由于失误,而写成了表名,所以出现了该错误,把表名改成对象名就好了。
错误信息如下:org.hibernate.hql.internal.ast.QuerySyntaxException: person is not mapped [select p from person p where p.name = :name and p.address = :address]
在练习Springdata JPA时,@Query注解
这里要注意的是注解中写的算是HQL,所以查询的是对象,而不是表名,此处由于失误,而写成了表名,所以出现了该错误,把表名改成对象名就好了。