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

前端 未结 19 2225
感动是毒
感动是毒 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条回答
  •  天命终不由人
    2020-11-30 20:59

    Also check that you added the annotated class using:

    new Configuration().configure("configuration file path").addAnnotatedClass(User.class)

    That always wasted my time when adding a new table in the database using Hibernate.

提交回复
热议问题