【JPA】INSERT语句报错

问题:执行JPA语句 insert into `order` ( create_time, delete_time, update_time, expired_time, final_total_price, order_no, placed_time, prepay_id, snap_address, snap_img, snap_items, snap_title, status, total_count, total_price, user_idvalues (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 报如下错误:

Resolved [org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [5] did not match expected type [java.lang.Long (n/a)]

参数值[5]与预期的类型[java.lang.Long(n/a)]不匹配;

解决方式:修改 model order 类中第5个字段类型为Long。

 

posted @ 2020-04-19 12:51  妞小唛  阅读(1941)  评论(0编辑  收藏  举报