-->
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.  [ 1 post ] 
Author Message
 Post subject: Update the partial java object through merge
PostPosted: Fri Oct 03, 2008 10:09 am 
Newbie

Joined: Fri Oct 03, 2008 9:32 am
Posts: 2
Hi

From the presentation layer i am sending the partial java object where i am changing only one or two elements (i know the id or key). When i try to do session.merge() on the partial object, my understanding is if there is no persistent instance currently associated with the session, try to load it from the database and merge with the object i am passing.

The object which i am trying to update has both parent and child relations. After the merge i am loosing all the relations and only updating the fields which sets in the java object.

Question is there a way i can update the partial object and preserve all the relations or i have to pass the whole object (with relations) when i do merge. Any insight or suggestions is of great help. I am using hibernate 3.


Regards
Rishi


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

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.