I used NH 3.2 mapping by code and I tryied Nhibernate Mapping Generator http://nmg.codeplex.com/ which looked a great tool.
I found a big difference between my code and theirs. On each class they have a call to the function LazyLoad(). (Although I thinked that it was the default behaviour)
Now I fear that my application doesn’t use lazy loading, does someone know the default behaviour of nh 3.2 with mapping by code ? (when we don’t call the LazyLoad method)
Regards
Depends on the
default-lazyattribute of thehibernate-mappingtag which can be changed in Fluent NHibernate by adding theDefaultLazy.Always()orDefaultLazy.Never()convention.If no
default-lazyattribute is defined (no convention added in Fluent NHibernate), lazy loading is enabled.