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 }
|
|