Users is not mapped(Hibernate实体类采用注解)
今天做简单的登陆验证web应用时,用HQL语句查询数据表时
总是出现Users is not mapped [from Users u where u.username=? and u.password=? ]错误;
后面在HQL语句上把数据库表映射的实体类加上包名 (形如yii.entity.Users);
查询成功
posted on 2016-05-16 01:49 Eternalisland 阅读(2250) 评论(0) 编辑 收藏 举报