【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_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 报如下错误:
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。