Pardòn!! I did mean lazy loading the entire graph.

On 23 Set, 14:21, "Fabio Maulo" <[EMAIL PROTECTED]> wrote:
> lazy="extra" delay the load of the list late as possible.Mean, for example:
> - Count don't initialize the collection
> - Delete don't initialize the collection
> - Add don't initialize the collection if you are using IList
> - and some other matters.....
>
> 2008/9/23 Tommaso Caldarola <[EMAIL PROTECTED]>
>
>
>
>
>
> > Wow!!! In a project NH 1.04 based we have a custom deep lazy load!!!
>
> > On 23 Set, 13:01, "Fabio Maulo" <[EMAIL PROTECTED]> wrote:
> > > In NH2.1 (trunk) you can use lazy="extra"
>
> > > 2008/9/22 gatapia <[EMAIL PROTECTED]>
>
> > > > Hi,
>
> > > > I need to serialise a data tree however the performance of this is
> > > > understandable poor as all children must be fetched prior to
> > > > serialisation.  I was looking for a better performing way of doing
> > > > this.
>
> > > > Currently before serialising a child collection I check wether the
> > > > collection is empty by:
>
> > > > if(NHibernate.NHibernateUtil.IsInitialized(Children)) { return
> > > > Children.Count() > 0; }
> > > > NHibernate.IQuery q = GetSession().CreateFilter(Children, "Select
> > > > count(*)");
> > > > return Convert.ToInt32(q.UniqueResult()) > 0;
>
> > > > This greatly improves performance over a straight call to
> > > > Children.Count() but I still think there must be a better way of doing
> > > > this.
>
> > > > If an Entity has 2+ children collections can I get their count in one
> > > > database call?
>
> > > > Any other suggestions?
>
> > > > Thanks
>
> > > > Guido Tapia
>
> > > --
> > > Fabio Maulo
>
> --
> Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to