• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to update data in many-to-many mapping

 
Niranjan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
  • 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=?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic