[url]http://hi.baidu.com/langchao826/blog/item/e502ca11c487327bcb80c4ee.html/cmtid/6d00fa028ed034034afb5118[/url]
[size=medium]org.hibernate.PropertyValueException: not-null property references a null or transient value: com.bjcx.project.entity.task.Equipmenttable.ProjPortfolioID
at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate
字面意思:一个不允许为Null的属性引用了一个为Null的或者无效的值。
原因:在***.hbm.xml中的
<property name="ProjPortfolioID" column="ProjPortfolioID"
type="big_decimal" not-null="true" length="10" />
中,not-null="true",这说明属性ProjPortfolioID 不允许为空,而在ActionForm中未给他赋值,则就为空,所以就会报错!
[/size]
[size=medium]org.hibernate.PropertyValueException: not-null property references a null or transient value: com.bjcx.project.entity.task.Equipmenttable.ProjPortfolioID
at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate
字面意思:一个不允许为Null的属性引用了一个为Null的或者无效的值。
原因:在***.hbm.xml中的
<property name="ProjPortfolioID" column="ProjPortfolioID"
type="big_decimal" not-null="true" length="10" />
中,not-null="true",这说明属性ProjPortfolioID 不允许为空,而在ActionForm中未给他赋值,则就为空,所以就会报错!
[/size]