-->
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: Ways of handling updates on collections when using DTOs
PostPosted: Tue Aug 22, 2006 12:18 pm 
Beginner
Beginner

Joined: Thu Jul 08, 2004 8:56 am
Posts: 23
Has anyone ever found a good way of handling updates between DTOs and DOs when you have collections involved that does not lead to the issue of having two objects with the same identifier in a session.

The only sollution I could find is to issue a retainAll on the collection passing the list of DOs converted from the DTOs and them manually add the new ones and update the existing ones. This way I get rid of the elements that have already been removed from the collection and add/update the new ones. The problem is that this updating code is repetitive and error prone.

Has anyone ever found a better way for handling such situations?
I faced this problem while doing a project using GWT and Hibernate (the project is hosted on SF.net http://sf.net/projects/cooperweb).
I was trying to find out if there is another solution that poses less effort and less chance of errors.

regards,
Rafael Ribeiro

_________________
Rafael Ribeiro


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.