Hibernate 中出现 users is not mapped 问题
来源:互联网 发布:java中什么是多态 编辑:程序博客网 时间:2024/06/02 05:11
我们在用hibernate的hql进行查询时经常会出现一个异常:
它说这个表不匹配,网上各种说法都是什么配置文件不对啊之类的,其实不然,这是hql语句的问题,
String hql="from goodsbigtype g where g.goodsBigTypeName like '二%'";
goodsbigtype 是数据库表中的表名,这其实是不对的, HQL语句中表名应该是ORM映射的类名,所以应该改成:
String hql="FROM GoodsBigType g where g.goodsBigTypeName like '二%'";
并且g.goodsBigTypeName中的goodsBigTypeName必须与GoodsBigType类中相应的属性名要保持一致。
0 0
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 users is not mapped 问题
- Hibernate 中出现 QuerySyntaxException: users is not mapped
- Hibernate 中出现 XXXX is not mapped 问题
- SSH框架中hibernate 出现 user is not mapped 问题
- SSHE框架中hibernate出现user is not mapped问题
- Hibernate 中出现 GOOD is not mapped 问题
- Hibernate 中出现 XXXX is not mapped 问题
- hibernate 出现 is not mapped 问题
- hibernate 出现***is not mapped
- hibernate:运行时出现user is not mapped问题
- 解决Hibernate使用HQL查询出现is not mapped问题
- Hibernate或者ssh三大框架中出现 XXXX is not mapped问题
- Hibernate 中出现 xxx表 is not mapped xxx的问题
- org.hibernate.hql.internal.ast.QuerySyntaxException: users is not mapped
- nested exception is org.hibernate.hql.ast.QuerySyntaxException: users is not mapped. [from users]
- sql总结
- SVN服务器搭建和使用
- BigPipe: Pipelining web pages for high performance
- Webview setLayoutAlgorithm
- VC学习笔记9动态链接库
- Hibernate 中出现 users is not mapped 问题
- 设计模式 原型模式与C++ & 设计模式的思考
- C++虚函数及虚函数表解析
- 浅析Lua中table的遍历
- Office For Mac 2016安装与破解
- LTView(定义一个视图的类,相当于C中的函数)
- VC学习笔记10多线程
- mysql慢查询日志
- 函数返回类型为指针类型时