I know how to combine tables in an SQL update, but how to do it in HQL?
Long story. I have elements that I process in perspective. Each of them runs as an identifier, and I have a many-to-many relationship between elements and runs (which are in an additional table).
Now I want to set the state of all the elements used in a particular run. The naive approach is as follows:
update Items item
set item.statue = :done
where item.state = :new
and :run in item.runs
The last line does not work. Hibernate cannot turn a bag of runs into something that can be used in a where clause. What solution?
source
share