Thats it! Thx a bunch.

/Carsten

On Mar 23, 3:07 pm, Carsten Hess <[email protected]> wrote:
> Ayende -I'mnot using a HQL to load the collection - the collection
> is a non-lazysetof an entity . So there's no where tosetthe
> "SetCachable(true)" - (which I'am already using with success on some
> HQL queries).
>
> The problem is also not only that its not being cached, but that the
> elements of the collection are fetched one by one instead of loading
> them in one go using the id of their parent entity (which it does when
> I disable caching on theset)
>
> Kind regards
> Carsten
>
> On Mar 23, 2:40 pm, Ayende Rahien <[email protected]> wrote:
>
>
>
> >http://ayende.com/Blog/archive/2006/08/21/TheSecretLifeOfNHibernatesC...
>
> > On Mon, Mar 23, 2009 at 8:45 AM, Carsten Hess 
> > <[email protected]>wrote:
>
> > > Hello there.
>
> > > Using trunk.
>
> > >I'mseeingastrangebehaviouron asetmapping.
>
> > > I used to have amappinglike this:
>
> > > <class A
> > >    <cache usage="read-only"/>
> > >    <setB>
> > >        <one-to-many class="X"/>
> > >  </set>
> > > </class>
>
> > > My entity A is perfectly cached and retrieved from 2. level cache
> > > (seen via NHProf) and thesetof X's (150 elements) is fetched in one
> > > go afterwards.
>
> > > Now to thestrangebehaviour:
> > > I found out that its possible to cache asetas well and therefore
> > > added this to themapping:
>
> > > <class A
> > >    <cache usage="read-only"/>
> > >    <setB>
> > >        <cache usage="read-only"/>                           <---
> > > caching of theset
> > >        <one-to-many class="X"/>
> > >  </set>
> > > </class>
>
> > > Now 150 elements of thesetare loaded in a N+1 fashion one by one via
> > > their id !!!  (and they are not cached)
>
> > > Is this a bug or am I missing something ??
>
> > > Kind regards
> > > Carsten
--~--~---------~--~----~------------~-------~--~----~
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