Cannot set order_time: incompatible types, cannot convert java.sql.Timestamp to java.lang.String Query

Cannot set order_time: incompatible types, cannot convert java.sql.Timestamp to java.lang.String Query

无法设置顺序时间:不兼容的类型,无法转换java.sql.Timestamp时间戳到java.lang.String语言查询

我的问题是:在数据库中date类型刚开始设置为datetime,默认格式为:0000-00-00 00:00:00而我想默认当前时间截更新数据

所以我更改为timestamp---报错的原因是我默认的格式为0000-00-00 00:00:00,所以不能转换而报错

修改方法:把timestamp--默认值改为:current-timestamp

原文地址:https://www.cnblogs.com/yangmie/p/13098228.html