Joined: Sun Dec 10, 2006 3:40 am Posts: 4
|
I have a search criteria, i want to change a value in all the objects returned from the criteria
SQL:
UPDATE set val='new' where "dynamic search criteria'
Is there any way to do it using Criteria API ?
If not i have some workaround:
I getting all the ids of the objects that need to be changed using the criteria :
This is my HQL:
"update Object o set o.val = :val where o.id in (:ids) "
But I dont know how to insert the ids now - the ids are of type Long
I have an arraylist of them?
Thanks
|
|