Hello!
After trying some things with hibernate, it comes to me, that i miss a feature.
The only access to the result set has to be done through list() (for now), but often i would like to get a set of records, and access them by some custom key.
There are not soo much changes to such a table, and so i would like to read this records only if there are changes in the database, exactly the same way as list() works.
I have looked into the criteria api and loader now, and it looks like it is some work to do, to make the cache accept something else than lists.
I know, i could create my map by processing the list in the application, but then, this has to be done for every transaction.
Even if the result from list() comes from the cache, to popuplate the map on every transaction might be too expensive.
I would like to try to implement a function like map(comparator), but only if it make its way into hibernate.
Do you think this is use- (and doable)?
|