Do you know what version of AR you are running? The following changes were
roughly three years ago:

----------------------------

>From NHibernate release notes:
Build 1.2.0.Alpha1
========================

Important Breaking Changes:
    * Entities and collections are lazy by default. Change by setting
default-lazy="false"
      in <hibernate-mapping>.

----------------------------

>From ActiveRecord svn log:

Revision: 2593
Author: ayende
Date: 04:33:27, 08 October 2006
Message:
Potentially breaking change: all classes / associations are now lazy by
default.
  This is done to match NHibernate 1.2 behavior.
  This can be turned of by specifying default-lazy="false" in the
<activerecord> element in the configuration. (Global flag)
  Explictly specifying lazy behavior always override the default setting.
  Modified tests to retain the old behavior.

2009/6/9 vekaz turkovic <vek...@gmail.com>

>
> Thank you both for your replies.
>
> I read somewhere that lazy loading is enabled by default, but figured
> out yesterday (after I got some sleep :)) that it's not.
>
> I'll whine again soon, I promise :p
>
>
> Markus Zywitza wrote:
> > try with:
> >
> >      [HasMany(typeof(Dokument), ColumnKey = "PacijentID", Table
> > = "Dokument", *Lazy=true*)]
> >       public *virtual* IList<Dokument> Dokuments
> >       {...}
> >
> > That should be enough, provided you are using SessionScope.
> >
> > -Markus
> >
> > 2009/6/8 vekaz turkovic <vek...@gmail.com <mailto:vek...@gmail.com>>:
> > > I tried removing all the relations from Patient, except for one -
> > > Document, and still the same queries get generated.
> > > Document table has only one relation - that with Patient:
> > >         [BelongsTo("PacijentID")]
> > >        public virtual Pacijent Pacijent
> > >        {...}
> > >
> > > Patient side:
> > >        [HasMany(typeof(Dokument), ColumnKey = "PacijentID", Table =
> > > "Dokument")]
> > >        public IList<Dokument> Dokuments
> > >        {...}
> >
> >
> > >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-users@googlegroups.com
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to