-->
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: Batch loading of maps by key
PostPosted: Tue Sep 27, 2011 9:57 am 
Newbie

Joined: Fri Jul 01, 2005 2:14 pm
Posts: 4
Hi,

I have a specific way I would like to batch load maps and I am hoping someone here can give me a suggestion as to how to go about this. Each of my hibernate entities has a persisted map. The collection is a one-to-many using a join table and is currently batch loaded in batches of 1000. The normal batch loading process loads all uninitialized proxies when the first one is access which loads all the maps. My problem is that these maps are big and I am usually only interested in a few keys in the map. So instead of the normal batch loading, I would like to load all the values for a given key the first time the key is accessed. Each key accessed would trigger a new database query to load all the values for that key for each entity.

Anyone have any thoughts on how I would do this? Does extra lazy loading work with maps in conjunction with batch fetching (it doesn't seem so)?

Thanks,
Doug


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.