I posted it in a different thread without any replies (
http://forum.hibernate.org/viewtopic.php?t=974833&highlight=), so I try it here.
I couldn't find any information in the book how to cache root entries. I know how to cache objects referenced by others (sets, joins), and also how to cache results. But I want to read a whole table with one select and access the entries with maximum speed e.g. from a HashMap<ArrayList<c>>.
The (legacy) lookup table has two columns (a, b), and a third "result" column (c). There are lots of different a/b-combinations, and a/b is not a primary key, which means there may be many c's for any given a/b.
Example:
ArrayList<c> lookupValues=map.get(createKey(a, b))
The solutions I evaluated so far generate lots of selects (one for any a/b combination), which is prohibitive for performance reasons.
Is there any better solution with Hibernate? How can I instruct Hibernate to cache all *root* objects for a table?
Thanks a lot!