HIbernate 3.2 java.lang.IllegalArgumentException: object is not an instance of declaring class
来源:互联网 发布:创意广告知乎 编辑:程序博客网 时间:2024/05/29 05:53
1. 用select count(id) from table_a ; 返回的记录数必须Long类型,不然出错
2. 在读取记录中的HQL,参数必须匹配,不然出错
例如:
表:table_a ,table_b
主键类型都是String id;
table_a 多对1table_b
根据table_b的Id来查询table_a里面的记录,hql如下
from table_a A Where A.b = ? ;
此时在传入?的参数必须是一个table_b类的实例,不能是一个String类型的id
在hibernate 3.2之前的版本用String类型的id是不会出错的。
- HIbernate 3.2 java.lang.IllegalArgumentException: object is not an instance of declaring class
- nested exception is java.lang.IllegalArgumentException: object is not an instance of declaring class
- java.lang.IllegalArgumentException: object is not an instance of declaring class
- java.lang.IllegalArgumentException: object is not an instance of declaring class
- hibernate 4 object is not an instance of declaring class
- object is not an instance of declaring class
- object is not an instance of declaring class 反射异常
- object is not an instance of declaring class 反射异常
- 报错:object is not an instance of declaring class
- spring的 object is not an instance of declaring class
- object is not an instance of declaring class
- 异常笔记(2)--object is not an instance of declaring class while invoking public abstract java.lang.Long
- java反射错误:object is not an instance of declaring class
- java axis调用cxf 的坑object is not an instance of declaring class while invoking public
- Xfile 错误记录 object is not an instance of declaring class
- object is not an instance of declaring class&argument type mismatch
- 项目启动后,访问报 object is not an instance of declaring class 错误
- Caused by: java.lang.IllegalArgumentException: Not an managed type: class
- 应用程序向IIS传送身份验证
- map删除
- 图像透明拷贝 - 不同方法的效率比较
- Berkeley DB for C(2)
- 微软题目解析
- HIbernate 3.2 java.lang.IllegalArgumentException: object is not an instance of declaring class
- csdn.net
- 人名排序实现
- 假如我中了6500万
- 进程与线程(转载)
- 假如我中了6500万
- 互联网模型、封包拆包、路由器、TCPIP
- 趣谈 Unicode 编码
- ASCII编码表