Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate HQL update mutliple tables

 
Gigi Kent
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I trying to write an sql to update 2 columns, each columns is in another table.
I need an hql.
something like
update A.col='rr', B.col='aa' from toto as A inner join bobo as B on A.a=B.b

I found somethong for an SELECT but I don't knwo how to adapt it to an update.

This works:
from table1 as a inner join a.patient as b where a.source='aaaaa'

For instance, this one does not works:

update table1 as a set a.source='llll', b.source='aaaaa' inner join a.patient as b where a.source='mmmmm'

Please, any ideas. I realy need this query, quickly

Thanks.

Corneliu.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic