-->
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: How to avoid defining Collections inside a Transfer Object
PostPosted: Sun Oct 05, 2008 9:41 pm 
Newbie

Joined: Sun Oct 05, 2008 9:17 pm
Posts: 1
Hi guys,

I have a class called Customer. To make a one-to-many relationship between this Customer and his accounts (identified by Account class), I can define a Set/Map/List type property called accounts inside the Customer class and make the necessary mappings inside the .hbm.xml corresponding to Customer and Account classes.

I would like to know if I can avoid defining these Colleciton type properties inside the Class from which I need to make a one-to-many relationship. Because in future, there can be another Class say Address to which I need to make the same kind of relationships and in that case, I need to make changes in the Customer class again. I want to avoid making changes in my Transfer objects once they are created. If I can somehow manage these Colleciton type propery definition outside the Customer class, I can accomplish this.

Please help me how I can do this.

Thanks,
Bostonguy


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.