-2
我的问题如下所示。我可以将SQL更新语句转换为HQL,并有多行更新?
注意粗体部分。
update tableName set tableName.fid ='10'where tableName.pid IN(:'1','2','3');
我的问题如下所示。我可以将SQL更新语句转换为HQL,并有多行更新?
注意粗体部分。
update tableName set tableName.fid ='10'where tableName.pid IN(:'1','2','3');
String hqlUpdate = "update Customer c set c.name = :newName where c.name = :oldName";
请参阅 “Hibernate Reference Documentation: DML-style operations”
谢谢您的回答但我认为你没有注意到IN声明。基本上用他们自己的特定标准更新多行是我的问题旋转的地方。 – MikeGte 2013-06-24 18:43:24
http://stackoverflow.com/questions/5198636/how-to-convert-nested-sql-to-hql – 2013-02-19 13:42:52