XXX is not mapped
这个问题绊了我两次跟头,作为一个3年多开发经验的人,甚是尴尬
java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: SmsTemplate is not mapped [select o from SmsTemplate o where o.templateCode = ?1 and o.disabled = ?2]
此问题为找不到映射文件,
解决方式为:在persistence.xml中配置SmsTemplate的PO路径!!!!!
我要罚自己喝完两大杯水
XXX is not mapped的更多相关文章
- 关于Hibernate XXX is not mapped 错误
我的实体类是这么配置的 @Entity(name="EntityName") //必须,name为可选,对应数据库中一的个表 就会出现 XXX is not mapped. ...
- hibernate:XXX is not mapped
hibernate:XXX is not mapped 检查项目中是否将hbm.xml引入
- 使用hql当异常查询:Xxx is not mapped[from Xxx where ...]
采用当今项目hql询问.出现 QingAoCenterInfo is not mapped[from QingAoCenterInfo where...] 显然地Hibernate映射关系出现了 ...
- org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped
异常情况: 最近在把一个项目拆分多个 module 的时候数据库查询遇到这个异常:org.hibernate.hql.internal.ast.QuerySyntaxException: Identi ...
- Hibernate 中出现表名(XXX) is not mapped 问题
今天晚上自己试着用Hibernate去搭建一个Web工程,然后去实现一个简单的登录.通过Hibernate?做查询操作的时候总是报出这样的错:users is?not?mapped. 于是乎去检查了下 ...
- org.hibernate.hql.ast.QuerySyntaxException: XXX is not mapped
因为 String sql2 = "select s from Student s where s.clazz.name=:name"; 此处的 Student 应该为类名.hql ...
- JPA使用中遇到Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped
在写自定义查询时,Query注解中写的JPQL,表名和列名都应该是映射的Java类和属性,不能写表名或者字段名
- HQL中出现XXX is not mapped的错误
我的代码如下 @Test public void testCollection(){ String hql = "from Order where orderItems is not emp ...
- 实体类和数据表的映射异常(XXX is not mapping[ ])
在使用SSH框架开发过程,使用hibernate框架提供的工具类实现与数据库数据交互,在执行cmd操作时,如果出现以下异常: org.hibernate.hql.ast.QuerySyntaxExce ...
随机推荐
- 制作根文件系统之内核如何启动init进程
start_kernel其实也是内核的一个进程,它占用了进程号0,start_kernel的内容简写如下: asmlinkage void __init start_kernel(void) //内核 ...
- Windows Live Writer
一.简介 Windows Live Writer 是一个强大的离线博客编辑工具,通过它可以离线编辑内容丰富的博文,除了自身强大的编辑功能之外,还提供了接口,让其它开发人员通过插件提供工具自身没有提供的 ...
- IIS 域名 带参数 设置重定向
IIS里面设置重定向后,经常会出现,从百度快照里直接打不开的情况. 可以在IIS里面设置重定向的时候,把参数加上,格式如下: http://www.***.com%S%Q
- (转)DataRow的各种状态和DataView的两种过滤属性
DataRow的各种状态 http://www.cnblogs.com/zxjyuan/archive/2008/08/20/1271987.html 一个DataRow对象刚被创建之后(DataTa ...
- Java 7.21 游戏:豆机(C++&Java)
PS: 难点在于,随机之后的分隔,理解就很容易了 注意:槽的奇偶情况 C++: #include<iostream> #include<ctime> #include<s ...
- hdu 4717(三分) The Moving Points
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4717 n个点,给出初始坐标和移动的速度和移动的方向,求在哪一时刻任意两点之间的距离的最大值的最小. 对于最 ...
- 小话C源码移植
我们知道国外很多程序员工作在linux / unix 环境下,所以有很多优秀的c/c++语言代码不能直接在windows平台进行编译. 很多时候我们只能使用msys, cmake等工具进行模拟环境编译 ...
- How to change and add some params to request in Laravel controller?
$request->merge([ 'aae_id' => request('id', 0), 'foo' => 'bar', ]);
- Squares of a Sorted Array LT977
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each ...
- vue组件中this和$el指向
示例代码为element ui 源码的select组件源码 控制台输出: 结论: this指向组件的实例. $el指向当前组件的DOM元素.