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里面的数据,为何数据过来只更新了一条.
"expiration_date", expiration_date).setDouble("price", price.doubleValue()).setParameterList("flightIds",
flightIds).executeUpdate();