Users is not mapped(Hibernate实体类采用注解)时间:2023-03-09 00:05:37 今天做简单的登陆验证web应用时,用HQL语句查询数据表时 总是出现Users is not mapped [from Users u where u.username=? and u.password=? ]错误; 后面在HQL语句上把数据库表映射的实体类加上包名 (形如yii.entity.Users); 查询成功