• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HQL update query problem.

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have 2 tables Asset and Asset_Dist_Types. Asset is parent and Asset_Dist_Types is a child table. Asset_Dist_Types is having 2 columns asset_id and lkp_dist_type where asset_id is the primary key in Asset table. In Asset_Dist_Types it is a many to many (one asset_id can have multiple lkp_dist_type entries.) In java, we have entity class only for Asset table. In that for Asset_Dist_Type, they have mentioned it as collection of elements. In Asset.java, entry for Asset_Dist_Type is as follows.



Now I would like to update Asset_Dist_Type table's lkp_dist_type column. I have list of asset id's. I have written following query to update it.



But this is throwing



Since I am new to hibernate I am not getting what is the solution. Can someone please help me?

 
reply
    Bookmark Topic Watch Topic
  • New Topic