11
votes

how to disable lazy loading in fn r1.0?

3

3 Answers

21
votes
Fluently.Configure()
.Database(
       SQLiteConfiguration.Standard
       .InMemory)
       .Mappings( m => m.AutoMappings
           .Add( AutoMap.AssemblyOf<_Field>() ) )
       .Conventions
           .Add( FluentNHibernate.Conventions.Helpers.DefaultLazy.Never() )
       .BuildSessionFactory();
15
votes

You can try with:

Not.LazyLoad();

inside your mapping constructor.

5
votes

Like this:

References(x => x.Something).Not.LazyLoad();