• 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

how to update data in many-to-many mapping

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All, I am getting the data using sessio.load() in many-to-many mapping.

And i am putting all the data in DTO's. Now i am updating data by using Setters. AFter that i am updating data using session.update(). (I tried with session.saveOrUpdate() also). But i am getting deletion operation on Reference table which contains reference keys of two table.


Can any one can send me sample code for passing dto objects for updation in many-to-many mapping..


thank's all
nirumagic@gmail.com
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"nirumagic"

Welcome to JavaRanch!

Please could you update your display name so it complies with our Naming policy. You can do this here. Thanks!
 
Niranjan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If i use Session.update()..i am getting following querys in many-to-many mapping. how can update refrese table without deletion opration

Hibernate: update User set uname=? where myId=?
Hibernate: update dept set deptName=?, description=? where deptId=?
Hibernate: delete from semp_dept where deptId=?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic