All my references are configured to be lazy loaded like this:
References(x => x.SomeProperty).ReadOnly().LazyLoad();
Everything works fine. Proxies are created. Now I added the following line in each entity mapping class:
Cache.ReadWrite();
and enabled L2 cache like this:
var fluentConfiguration = Fluently.Configure().Database(MsSqlConfiguration.MsSql2005.
ConnectionString(connectionStringBuilderAction).
Cache(builder => builder.UseQueryCache().ProviderClass<HashtableCacheProvider>()));
After enabling L2 cache my references are not loaded at all. Proxies are not created. The value of SomeProperty is null.
What did I miss?