-->
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: Selective reference loading
PostPosted: Thu Apr 01, 2010 6:49 am 
Beginner
Beginner

Joined: Tue Mar 10, 2009 11:50 pm
Posts: 23
Is there a way hibernate provides selective reference loading in case of objects with multi-level references

Say my object references are as below,

ServiceModel > FeatureModel > AttributeModel > EnumModel

Bundle > ServiceModel (without any references)

I need to load the ServiceModel object graph in one instance ( with all its dependencies),
but during linking up of Bundle > ServiceModel, i dont need other references ( FeatureModel > AttributeModel > EnumModel) as this is unnecessary data according to the business scenario.

To solve this problem i created two model classes of ServiceModel

1. ServiceModelVO - Thick object with all references
2. ServiceModelThinVO - Thin object without any references

Bundle is related to ServiceModelThinVO, Bundle > ServiceModelThinVO

Is this the best approach to do so ? I followed the same approach for two, three other model classes as well resulting in lot of duplicate model bean classes. Does hibernate provide selective reference loading property ?

_________________
Cheers,

Vinod
We act as though comfort and luxury were the chief requirements of life, when all that we need to make us happy is something to be enthusiastic about


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.