Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient va
2013-11-06 16:49
731 查看
Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.employment.entity.News.childColumns
出现如上错误的解决方法之一:
<many-to-one name="childColumns"
class="com.employment.entity.ChildrenColumns"
fetch="select"
cascade="save-update"
lazy="false" >
<column name="columnid" not-null="true"/>
</many-to-one>
就是在实现表之间的级联映射的时候,如果两表之间是一对多的关系的话,则千万不要忘记在一的一端加上上面红色字体部分,不然就会报如上错误。
这是本人遇到的问题,纠结了很久才解决的,在这希望能帮到有此问题的你们。
出现如上错误的解决方法之一:
<many-to-one name="childColumns"
class="com.employment.entity.ChildrenColumns"
fetch="select"
cascade="save-update"
lazy="false" >
<column name="columnid" not-null="true"/>
</many-to-one>
就是在实现表之间的级联映射的时候,如果两表之间是一对多的关系的话,则千万不要忘记在一的一端加上上面红色字体部分,不然就会报如上错误。
这是本人遇到的问题,纠结了很久才解决的,在这希望能帮到有此问题的你们。
相关文章推荐
- org.hibernate.PropertyValueException: not-null property references a null or transient value:
- 错误:org.hibernate.PropertyValueException:not-null property references a null or transient value
- org.hibernate.PropertyValueException: not-null property references a null or transient value
- org.hibernate.PropertyValueException: not-null property references a null or transient value
- org.hibernate.PropertyValueException: not-null property references a null or transient value : xxx
- org.hibernate.PropertyValueException: not-null property references a null or transient value: model.
- org.hibernate.PropertyValueException: not-null property references a null or transient value: model.
- org.hibernate.PropertyValueException: not-null property references a null or transient value
- 关于hibernate(jpa)报not-null property references a null or transient value的问题
- not-null property references a null or transient value : org.com.model.person_one_one_test.address
- hibernate级联保存问题,出错not-null property references a null or transient value
- hibernate异常:not-null property references a null or transient value
- 取数据 或 删除数据 DataIntegrityViolationException: not-null property references a null or transient value
- Java开发中,试用hibernate建立关联时出现:not-null property references a null or transient value异常的原因
- 错误:org.hibernate.PropertyValueException: not-null property references a null
- hibernate级联保存问题,出错not-null property references a null or transient value
- not-null property references a null or transient value
- not-null property references a null or transient value
- not-null property references a null or transient value:
- 商品订购系统时出现的问题汇总 not-null property references a null or transient value 等