Hibernate执行update日期报错

0
Hibernate MySQL SQL C/C++ Go 36336 次浏览

clipboard.png
执行上述代码 报错如下:

"PreparedStatementCallback; SQL [UPDATE yposx_store_goods SET update_time=?, store_market_enable=?, goods_id=? WHERE shop_id='5' AND goods_id='139'Data truncation: Incorrect datetime value: 'Mon Nov 12 15:39:14 CST 2018' for column 'update_time' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: 'Mon Nov 12 15:39:14 CST 2018' for column 'update_time' at row 1",

执行插入是没有问题的

请尽量让自己的答案能够对别人有帮助

51个答案

默认排序 按投票排序
0

对于刚刚接触hibernate的开发者来说,它确实是一个伟大的东西,但如果针对修改不太明白的话,那确实挺伤的。首先修改是根据id查找到实体。然后和保存一样,也是用save进行存储。

针对一些cdate创建日期,udate更新日期。我们希望创建日期只在添加是实体的时候创建,但是修改实体的时候cdate不发生改变,但是udate是在每次更新实体的时候改变,包括添加实体的时候。pgslot

0

<a href="https://algorithmicseo.co.uk/">seo services </a> 
 

0

Treat Assignment Help at diggerslist is one of the most trusted names in UK offering marketing dissertation writing services. Our dissertation writing experts will help you to choose the right quantitative analysis tool during your assignments. For More Services: Treat Assignment Help at dreamwidth  | Dissertation Writing Services | Online Assignment Help UK | UK Assignment Help Online | Treat Assignment Help at linustechips

0

Thank you for the code and error that goes with it. Now I know what to look for next time I have update issues. A Big Thank you from Victorian Islander Drywall Services, come check us out at www.drywallservices.com

0

Easy installation and disassembly without tools, just snap on the phone. LG V60 ThinQ 5G Case

0

Insteresting post!
Fred CEO of <a href="https://cincinnatipatiopaving.com">Paver Patios Cincinnati Ohio</a> <a href="https://waterheaterreplacementmason.com/">New Water Heater Install Mason Ohio</a> <a href="http://cincinnatiportapottyrental.com/">Cincinnati Porta Potty Rental</a> <a href="http://harrisonroofrepair.com/">Harrison Ohio Roofing Contractor</a> <a href="http://cincyvoiceover.com/">Hire Voiceover Services</a> <a href="http://cincypromotionalproducts.com/">Cincinnati Promotional Products</a> <a href="http://daytonpromotionalproducts.com/">Dayton Ohio Promotional Products</a> <a href="https://www.cheaperbetterbranding.com/">Cheap Promotional Products</a> <a href="http://restripingcincinnati.com/">Cincinnati Ohio Tennis Court Repair</a> <a href="http://tradesconstructionstaffing.com">Skilled Trades Staffing Agency</a>

0

what an interesting site-still trying to navigate my way but pleased to be here as a Hamilton window cleaning professional trying to expand my knowledge base

thanks for a great site

0

PG Slot ทรูวอลเลต

0

slotxo ทรูวอลเลต

1 2 3