lazy = false is not a really solution. If you set lazy to false, hibernate 
always load the collections. You don't get LazyInitializationException, but 
you read database more than you have to.

Hibernate.initialize() does the job. But you have to do it manually whenever 
you know that you may be will use that collection. So, if you didn't use it, 
you bring that collection from database with no need.

On 7/25/05, Alexandru Popescu <[EMAIL PROTECTED]> wrote:
> 
> #: by Pablo Ruggia's words the mind was *winged* :#
> > I know, it has to be much more configurable. But hibernate user lists or
> > forums are just so unfriendly. Every once I post a question about lazy
> > initialization, they kind of get ungry.
> >
> > On 7/25/05, Henri Dupre <[EMAIL PROTECTED]> wrote:
> >>
> >> That's a nice solution that hibernate patch... But I don't feel
> >> confortable patching hibernate... Have you submitted your solution to
> >> the Hibernate JIRA? This behavior should be customizable through the
> >> hibernate configuration.
> >>
> >>
> >> Thanks,
> >>
> >> Henri.
> >>
> >
> How is your solution different lazy=false or Hibernate.initialize()? (i 
> must confess i read it quite
> fast)
> 
> :alex |.::the_mindstorm::.|
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to