关于org.hibernate.hql.ast.QuerySyntaxException: 关键字命名的类 is not mapped [from 关键字命名的类 ]
来源:互联网 发布:保险软件开发外包 编辑:程序博客网 时间:2024/05/29 13:00
首先检查是不是在hibernate 的属性配置里是否加载有
<property name="packagesToScan"> <list> <value>com.test.model</value> </list> </property>
或者 <property name="annotatedClasses"> <list> <value>com.test.model.Orders</value> <value>com.test.model.Users</value> </list> </property>
以及注解@annotation是否有漏写。
-------------------重点分割线-----------------------
在SQL中order是关键字,user也是关键字。所以我们的vo类名和表名一定不能用关键字,否则也会出现文章题目那句异常提醒。
解决办法:
把类名实体名改为非关键字,比如加个s。
- 关于org.hibernate.hql.ast.QuerySyntaxException: 关键字命名的类 is not mapped [from 关键字命名的类 ]
- exception is org.hibernate.hql.internal.ast.QuerySyntaxException: Driver is not mapped...的坑
- nested exception is org.hibernate.hql.ast.QuerySyntaxException: users is not mapped. [from users]
- nested exception is org.hibernate.hql.ast.QuerySyntaxException: Product is not mapped [from Product]
- org.hibernate.hql.ast.QuerySyntaxException is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: myaddressbook is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: Enroll is not mapped.
- org.hibernate.hql.ast.QuerySyntaxException: ? is not mapped
- org.hibernate.hql.ast.QuerySyntaxException:is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常总结 .
- org.hibernate.hql.ast.QuerySyntaxException is not mapped异常
- org.hibernate.hql.ast.QuerySyntaxException: Person is not mapped
- org.hibernate.hql.internal.ast.QuerySyntaxException: Exam is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: UserType is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: **** is not mapped 异常总结
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped
- org.hibernate.hql.ast.QuerySyntaxException:XX is not mapped
- 如何在以太网芯片W5200中实现FTP客户端
- Software 记忆平台
- 成功人士须具备的15种良好心态
- Objectivt-c文件后缀
- 查缺补漏
- 关于org.hibernate.hql.ast.QuerySyntaxException: 关键字命名的类 is not mapped [from 关键字命名的类 ]
- OpenSessionInView会不会影响性能?
- fatal error C1189:
- Begining Linux Programing Chapter 3
- C语言头文件的使用
- 机房收费系统报表的使用
- VMware Tools installation cannot be started manually while Easy Install is in progress
- 一个程序猿眼中的国内主流地图api
- 使用js对JSON进行解析