关于hibernate(jpa)报not-null property references a null or transient value的问题
来源:互联网 发布:天罡掌诀推算法 编辑:程序博客网 时间:2024/05/01 14:19
最近在做一个购物网站,在其中遇到一个问题:javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.shop.bean.lmm.Lmm.time我弄了好长时间,才发现问题的所在。
原来,我在写
private Date time = new Date();
@Temporal(TemporalType.TIMESTAMP) @Column(nullable=false)
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
这部分代码时将private Date time = new Date(); 写成了private Date time;我忘记了new一个Date类型的对象,导致了一天多的郁闷,而且大部分的网上文档不给力,所以在写代码时一定要认真。
- 关于hibernate(jpa)报not-null property references a null or transient value的问题
- 关于:not-null property references a null or transient value
- 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
- not-null property references a null or transient value:
- hibernate异常: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: model.
- 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
- not-null property references a null or transient value: 等关于cinema项目bug
- 商品订购系统时出现的问题汇总 not-null property references a null or transient value 等
- 取数据 或 删除数据 DataIntegrityViolationException: not-null property references a null or transient value
- java中的异常not-null property references a null or transient value
- SSH-err:not-null property references a null or transient value:
- 如何在多台机器上共享IOS证书
- 私有继承中的派生类对象与基类对象间的转换
- Maven3实战笔记02坐标和依赖--1
- linux驱动头文件说明(转载)
- javascript中几种页面跳转方式
- 关于hibernate(jpa)报not-null property references a null or transient value的问题
- Proxy模式
- 颠倒栈
- 好久没来csdn啦
- 自定义ios UIAlertView, 重排按钮位置
- 由抢购小米手机联想到的一些问题
- MFC 的默认按键
- 监听WebView滑动到底端
- PHPExcel:用于Excel等文档生成的PHP开源类库