-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate SaveOrUpdate query
PostPosted: Mon Jul 11, 2011 5:39 am 
Newbie

Joined: Mon Jul 11, 2011 5:36 am
Posts: 2
Hi, I have one employee table contains empname.deptname and emp address. of which empname and deptname is my composite primary key.In the view I am displaying the data of emps of perticular department.
Now I add some emps and may remove from the view and on click of save button changes should reflect to database.
I am doing this using hibernate.
I used saveOrUpdate method but it is only updating previous data or adding new data.
I want to remove emps which were removed from the view.
What should I do for this.
Shall I remove all employees of dept from table when displayed on view and save all from view to table.
Is there any better way to do that?
Please guide...


Top
 Profile  
 
 Post subject: Re: Hibernate SaveOrUpdate query
PostPosted: Mon Jul 11, 2011 6:01 am 
Newbie

Joined: Mon Jul 11, 2011 5:36 am
Posts: 2
Please do reply...its urgent..
I want to implement this in my project in company..


Top
 Profile  
 
 Post subject: Re: Hibernate SaveOrUpdate query
PostPosted: Mon Jul 11, 2011 8:04 am 
Beginner
Beginner

Joined: Sat Aug 01, 2009 5:28 am
Posts: 42
sharing code may help you quickly......

_________________
Warm Regards,
Tarun Walia


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.