hibernate打印sql日志:在sessionFactory加入hibernate.show_sql=true
批量插入数据报错:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update
解决办法:
@SQLInsert(sql = "INSERT INTO t_vts_vesseltrip(id, mmsi, shipname, shiptype, lon, lat, sog, cog, navstatus, "+
"destination, eta, draught, meetevent, meettchannel, channeloverspeed, "+
"channellowspeed, channelunpower, channeltraverse, anchorevent,"+
"strandedevent, shipanomaly, oppchannel, overload, updatetime)"+
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, "+
"?, ?, ?, ?, ?, ?,"+
"?, ?, ?, ?, "+
"?, ?, ?, ?, ?);",
check = ResultCheckStyle.NONE)
批量插入数据报错:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update
解决办法:
@SQLInsert(sql = "INSERT INTO t_vts_vesseltrip(id, mmsi, shipname, shiptype, lon, lat, sog, cog, navstatus, "+
"destination, eta, draught, meetevent, meettchannel, channeloverspeed, "+
"channellowspeed, channelunpower, channeltraverse, anchorevent,"+
"strandedevent, shipanomaly, oppchannel, overload, updatetime)"+
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, "+
"?, ?, ?, ?, ?, ?,"+
"?, ?, ?, ?, "+
"?, ?, ?, ?, ?);",
check = ResultCheckStyle.NONE)