I'm searching for more than a week for that answer.. still no one that
could answer me.
some guy gave me an answer about some NoJoinProjection he created
himself that extended another Projection class but that was in java.
I tried to get that part of code out of the forum post, but the forum
is gone.. (hibernate.org forum)



On 1 apr, 21:43, Kaltz1974 <[email protected]> wrote:
> Hi!
> First thenak you for your help.
> I'am aware of how can achieveLazyloadingvia mapping.
>
> The desired behaviuor is to implement defaultloadingof the
> collection and disable it via code...
>
> Thank you in advance for your help.
>
> K.
>
> On 31 Mar, 14:43, Nick Nguyen <[email protected]> wrote:
>
> > I think you are trying tolazyload your detail collection...if that's
> > the case, then just remove thelazy="false" from your mapping  and
> > SetFetchMode from your criteria query...the default behavior islazy
> >loadingunless you override it.
>
> > On Mar 30, 7:44 pm, Kaltz1974 <[email protected]> wrote:
>
> > > Hi!
>
> > > Sorry for the mistyping... In CreateCriteria clause I have Master
> > > class indeed.
>
> > > But my query keepsloadingmy details...
>
> > > Any idea or suggestion?
>
> > > Kaltz1974
>
> > > On 31 Mar, 01:32, Stefan Sedich <[email protected]> wrote:
>
> > > > The query seems odd try:
>
> > > >  NHibernate.ICriteria aCrit;
> > > >        aCrit = mySession.CreateCriteria(TypeOf(HTestModel.Master));
> > > > <----- MASTER HERE NOT DETAILS
> > > >        aCrit.SetFetchMode("Details", NHibernate.FetchMode.Lazy);
> > > >        .....
> > > >        sMaster = aCrit.List<MyModel.Master>();
>
> > > > Unless I have missed something in the brief look I had, let me know.
>
> > > > Cheers
> > > > Stefan
>
> > > > On Tue, Mar 31, 2009 at 9:25 AM, Kaltz1974 <[email protected]> wrote:
>
> > > > > Hi!
>
> > > > > I'm in need for help for a probably stupid question but I've trying
> > > > > all day and I can't get out of it... pleas help me...
>
> > > > > I'm in a Master - Detail scenario.
>
> > > > > My master entity has a detail bag wherelazyproperty is set to FALSE
> > > > > (I should always load details...)
>
> > > > > I'm traying to shut down programmatically the eagerloadingof the
> > > > > collection during a particoular query but Nhibernate seems to ignore
> > > > > my code...
>
> > > > > This is my mapping:
> > > > >    <bag name="Details" table="Detail"lazy="false" generic="true"
> > > > > fetch="select">
> > > > >      <key column="IDMaster" />
> > > > >      <one-to-many class="Detail" />
> > > > >    </bag>
>
> > > > > I've got a code like this:
>
> > > > >        NHibernate.ICriteria aCrit;
> > > > >        aCrit = mySession.CreateCriteria(TypeOf(HTestModel.Details));
> > > > >        aCrit.SetFetchMode("Details", NHibernate.FetchMode.Lazy);
> > > > >        .....
> > > > >        sMaster = aCrit.List<MyModel.Master>();
>
> > > > > The details on sMaster are loaded despite the I'm trying to set the
> > > > >lazyloadingon.
>
> > > > > I don't now what I'm missing.
>
> > > > > Am I missing some sort of configuration on web.config?
>
> > > > > Thank you in advance.
>
> > > > > Kaltz1974
>
> > > > --
> > > > Stefan Sedich
> > > > Software 
> > > > Developerhttp://weblogs.asp.net/stefansedich-Nasconditestocitato
>
> > > > - Mostra testo citato -

--~--~---------~--~----~------------~-------~--~----~
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