id为空的org.springframework.dao.InvalidDataAccessApiUsageException: The given objec

在用到Spring和Hibernate开发时,update的时候就会报这个错误 意思好像就是有的属性不能为空 我的可能有的为空了,后来看了别的高手的回答,好像是更新时没有把对象的id传过去,所以报错,我将id隐藏的放在input中就ok了

org.springframework.dao.InvalidDataAccessApiUsageException: The given object has a null identifier: xml.dao.info.InfoRebate; nested exception is org.hibernate.TransientObjectException: The given object has a null identifier: xml.dao.info.InfoRebate
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:636)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
at

猜你喜欢

转载自tanweneye.iteye.com/blog/2067305