HibernateSystemException--ids for this class must be manually assigned before calling save()
来源:互联网 发布:成都华为软件工厂 编辑:程序博客网 时间:2024/05/22 09:44
org.springframework.orm.hibernate3.HibernateSystemException:
ids for this class must be manually assigned before calling save():adam.bp.workflow.entity.TaResourceassign2;
nested exception is org.hibernate.id.IdentifierGenerationException:
ids for this class must be manually assigned before calling save(): adam.bp.workflow.entity.TaResourceassign2
异常的意思是:
adam.bp.workflow.entity.TaResourceassign2 类的id必须在调用save方法之前手工分配,而且这是一个内嵌的异常。
我在这个类对应的TaResourceassign2.hbm.xml中配置的id生成类型是class="assigned",即手工分配,这不存在任何错误--因为我确实是手工分配id的。
通过查证,错误原因有以下几点:
1.此类的id值为空(没有set该值 或 手工生成的值为null)
2.对应的id配置类型以及长度不正确
3.外键关联配置管理的多对一映射,传递的对象为null(导致手工set时为null)
- HibernateSystemException--ids for this class must be manually assigned before calling save()
- ids for this class must be manually assigned before calling save():***错误说明
- error:ids for this class must be manually assigned before calling save():
- error:ids for this class must be manually assigned before calling save()
- ids for this class must be manually assigned before calling save()
- error:ids for this class must be manually assigned before calling save():
- ids for this class must be manually assigned before calling save() hibernate
- org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save():
- IdentifierGenerationException: ids for this class must be manually assigned before calling save()
- ids for this class must be manually assigned before calling save()..
- error:ids for this class must be manually assigned before calling save():
- 关于 error:ids for this class must be manually assigned before calling save(): 的解决方案
- ids for this class must be manually assigned before calling save():
- 工作札记--“ids for this class must be manually assigned before calling save”解决办法
- ids for this class must be manually assigned before calling save()..
- ids for this class must be manually assigned before calling save()
- message ids for this class must be manually assigned before calling save(): ID 的问题
- ids for this class must be manually assigned before calling save():
- 发发牢骚
- spring mvc注入配置文件里的属性
- socket编程原理
- 目前人生阶段的关键字
- Oracle 批量导出 Sequence
- HibernateSystemException--ids for this class must be manually assigned before calling save()
- 基于Ruby On Rails的项目(包括Plugin)网址收集
- Oracle IO问题解析
- 命令整理mvn,maven命令整理
- NoSQL
- http://www.chrisharrison.net/
- HashTable的实现测试
- php笔记
- sizeof strlen string.lenth()之例子 string,char,char*,char a[], sizeof,strlen(),str.length()...