s四川成都陈
2016-11-13 11:18
ERROR - Exception occurred during processing request: ids for this class must be manually assigned before calling save(): cn.czq.entity.Product; nested exception is org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): cn.czq.entity.Product
org.springframework.orm.hibernate3.HibernateSystemException: ids for this class must be manually assigned before calling save(): cn.czq.entity.Product; nested exception is org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): cn.czq.entity.Product
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:690)
一直这个问题好恼火啊
ids for this class must be manually assigned before calling save():
说你的id必须要设置了才能执行存储。
应该是在Product.hbm.xml里面看一下pid下面配了<generator class="native"></generator>或者是increment什么的生成器没。
方法中参数不对引起的
基于SSH实现员工管理系统之框架整合篇
49831 学习 · 344 问题
相似问题