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
|