String hql = "update FlightCourse as f set f.startDate=:start_date,f.expirationDate=:expiration_date,f.price=:price where f.id in(:flightIds)";
try {
int updateData = this.getSession().createQuery(hql).setDate("start_date", start_date).setDate(
"expiration_date", expiration_date).setDouble("price", price.doubleValue()).setString("flightIds",
flightIds).executeUpdate();
} catch (Exception e) {
e.printStackTrace();
}
我想批量更新flightIds里面的数据,为何数据过来只更新了一条.
try {
int updateData = this.getSession().createQuery(hql).setDate("start_date", start_date).setDate(
"expiration_date", expiration_date).setDouble("price", price.doubleValue()).setString("flightIds",
flightIds).executeUpdate();
} catch (Exception e) {
e.printStackTrace();
}
我想批量更新flightIds里面的数据,为何数据过来只更新了一条.
解决方案 »
- 表1内容a.qq;a,ss;b.qq;b.tt.如何给前面为a(或b)的行标记为a(或b)
- 利用C API在vs2008中如何向mysql数据库中插入海量不重复数据
- ,saving disk I/O operations是前提条件还是最终结果?
- Show Index 与 information_schema.statistics
- 生僻字无法写入。三大字符集都试过了
- 关于网上书店数据库的问题。急救啊。
- Mysql数据库insert中文时的错误,请帮助分析!
- mysql+jsp,如何在jsp 的request.getParameter 中得到中文而不是乱码问号
- 问一个比较简单的问题?
- mysql问题
- MySql中如何判断数据库是否存在的代码?
- MYSQL函数问题!急啊。。。急啊。。。。
"expiration_date", expiration_date).setDouble("price", price.doubleValue()).setParameterList("flightIds",
flightIds).executeUpdate();