Users is not mapped(Hibernate实体类采用注解)


 今天做简单的登陆验证web应用时,用HQL语句查询数据表时

总是出现Users is not mapped [from Users u where u.username=? and u.password=? ]错误;

后面在HQL语句上把数据库表映射的实体类加上包名 (形如yii.entity.Users);

查询成功

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM