Hello Oskar

Maybe there is a need for it, but I can't see a reason for the approach
taken in Hibernate - with the CacheableResultTransformer.

If GetResultColumnOrRow() always returned a consistent result (an object[])
that doesn't depend on the existence of a ResultTransformer, couldn't the
StandardQueryCache be adjusted to handle this? The intent would be to make
the CriteriaLoader, QueryLoader and CustomLoader more consistent in how
they behave - they are currently returning different 'shape' results
depending whether a transformer exists or not. All transformation would be
done in GetResultList() - after caching concerns - and would be applied to
an object[]. If you can wait, I will try to show you some code...assuming
my theory holds water when I try to implement it :)

Regards
Julian

On 30 December 2012 00:31, Oskar Berggren <[email protected]> wrote:

> The main idea seem to be to delay the CriteriaLoader's application of
> the user-specified result transformer until after caching, but to do
> so in a manner that only tries to cache the data actually required by
> the result transformer.
>
> The code on the branch passes all test cases (with a few expected
> adjustments) and also passes the previously failing tests for NH-2961.
>

Reply via email to