Hibernate error - QuerySyntaxException: users is not mapped [from users]

前端 未结 19 2251
感动是毒
感动是毒 2020-11-30 20:14

I\'m trying to get a list of all the users from \"users\" table and I get the following error:

org.hibernate.hql.internal.ast.QuerySyntaxException: users is          


        
19条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 21:08

    In your Query you have to use class name(User) not table name(users) so your query is "from User"

提交回复
热议问题