File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes how to update data in many-to-many mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "how to update data in many-to-many mapping" Watch "how to update data in many-to-many mapping" New topic
Author

how to update data in many-to-many mapping

Niranjan
Greenhorn

Joined: Jul 01, 2006
Posts: 5
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


Thanx & Regards,<br />--------------------<br />Nirumagic<br /> <br />niranjantalluru@gmail.com
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

"nirumagic"

Welcome to JavaRanch!

Please could you update your display name so it complies with our Naming policy. You can do this here. Thanks!


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Niranjan
Greenhorn

Joined: Jul 01, 2006
Posts: 5
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=?
 
 
subject: how to update data in many-to-many mapping
 
Threads others viewed
Hibernate: Updates all the items of a set - Cascade ‘create’ not working
hbm.xml file generation in netbeans
Problem with Oracle DataSource
abt updation in many-to-many mapping
Data concurrency issue with multiple MDB instances reading messages from a Queue
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com