Hi,
Is there a way to pre-fetch stuff into hibernate's L1 cache? E.g. I know my buissness logic somewhere deep in my code hirarchy will load entities with where key>10 and key <1000 one after another, so load all entities with a single query, instead of many small queries which load object-by-object.
I know I can fetch it into a List or HashMaps, but I would prefer some way to tell hibernate "I will need this later, please keep it in cache". Did it the HashMap/List way (using JDBC), but for complex buissness logic this destroys code quite a lot :/
Is this possible and if yes, how?
Thank you in advance, Clemens
|