This is something new to me, I always thought that lazy initialization
is to boost performance. So we should really use eager fetching by
default and minimize the use of OSIV.


On 8/22/07, Toni Lyytikäinen <[EMAIL PROTECTED]> wrote:
> "And, is there a better alternative than using
> OpenSessionInViewInterceptor?"
>
> Yes. It's important to realise that while OpenSessionInView feels very
> handy, it is not a particularly nice design pattern, as it can stress your
> database with lots of small queries. It's best to learn how to do eager
> fetching with Hibernate and use it for most cases and rely on OSIV only in
> some special cases where eager fetching is not possible. This way it's often
> possible to build entire web applications without resorting to use OSIV.
>


-- 

Hez

Reply via email to