wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Hibernate Hql for bulk update using two entity tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Hql for bulk update using two entity tables" Watch "Hibernate Hql for bulk update using two entity tables" New topic
Author

Hibernate Hql for bulk update using two entity tables

hafz Khan
Greenhorn

Joined: Jul 04, 2010
Posts: 16


I am using this query in mysql for updating multiple values for the column2 in Table1 with the values in the column2 in Table2 on certain condition. but i am not able to give two entity names in the hibernate update hql. can i know how i have to write the query below in hql so that it supports all database.

UPDATE Table1 A, Table2 B SET A.column2 = B.column2 WHERE A.column1 = B.column1

Thanks,
hfz
 
 
subject: Hibernate Hql for bulk update using two entity tables
 
Similar Threads
Projection from inner join
Single SQL query for retrieval of data with different where clause possible?
Update with FROM table concept
Help required for hibernate query (HQL) calling stored procedure
Help required for hibernate query (HQL) calling stored procedure