-->
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: Mapping complex objects with big collections - pls advice
PostPosted: Thu Jul 22, 2010 6:17 pm 
Newbie

Joined: Tue Oct 19, 2004 4:05 am
Posts: 14
Location: ireland
hi,

trying to fully use the strength of OOP in my application i've reached a point where most of my objects have one common parent object (like Car objects which obviously has Wheels objects ). This probably isn't a bad thing as such as long as the parent object doesn't hold too much information. Unfortunately in my case my parent objects has 6 collections of which each of them holds 5k+ objects - the upshot is that even with lazy loading data the amount of time/memory being used becomes unacceptable. Are there any hibernate/other patterns addressing these scenarios ? What would be the best way of mapping these relations? It looks like i should be using only foreing keys in MyObject class but than doesn't it defies the whole principal of OOP and hibernate mapping paradigm.

class MyObject{

@OneToMany
List<ChildType_1> childs1; //once lazy loaded this collection will hold over 5k objects
List<ChildType_1> childs2; //once lazy loaded this collection will hold over 5k objects
List<ChildType_1> childs3; //once lazy loaded this collection will hold over 5k objects
List<ChildType_1> childs4; //once lazy loaded this collection will hold over 5k objects
}


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.