nested exception is org.hibernate.PropertyValueException: not-null property references a null or tra

org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value: org.model.Activity.rPopular; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: org.model.Activity.rPopular
nested exception is org.hibernate.PropertyValueException: not-null property references a null or tra

很明显,非空的值关联了一个空值或无效的值,就是数据库里面rPopular字段设置为非空了,

在.hbm.xml文件里rPopular属性的not-null=“true” 该为 false 或者将其去除
例如:
nested exception is org.hibernate.PropertyValueException: not-null property references a null or tra