2012-12-20 64 views
2

我想为查询执行批量更新。这里有4个疑问,我想在批处理执行:Hibernate4中的批量更新

Update Contact SET contactNumber = '876-128-9871' WHERE userId = 1 AND contactType = 'A'; 
Update Contact SET contactNumber = '615-165-9071' WHERE userId = 1 AND contactType = 'B'; 
Update Contact SET contactNumber = '816-897-5818' WHERE userId = 1 AND contactType = 'C'; 
Update Contact SET contactNumber = '151-891-7861' WHERE userId = 1 AND contactType = 'D'; 

是否有可能进行批量更新这样的情况?

如果是的话那怎么样?

任何参考/链接赞赏。

回答