diff --git a/src/NHibernate/Impl/SessionFactoryImpl.cs b/src/NHibernate/Impl/SessionFactoryImpl.cs index b25b45410e6..458d5ecce9f 100644 --- a/src/NHibernate/Impl/SessionFactoryImpl.cs +++ b/src/NHibernate/Impl/SessionFactoryImpl.cs @@ -270,6 +270,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings model.RootClazz.CacheRegionName, model.CacheConcurrencyStrategy, model.IsMutable, + model.EntityName, caches); var cp = PersisterFactory.CreateClassPersister(model, cache, this, mapping); entityPersisters[model.EntityName] = cp; @@ -290,6 +291,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings model.CacheRegionName, model.CacheConcurrencyStrategy, model.Owner.IsMutable, + model.OwnerEntityName, caches); var persister = PersisterFactory.CreateCollectionPersister(model, cache, this); collectionPersisters[model.Role] = persister; @@ -446,10 +448,10 @@ private IQueryCache BuildQueryCache(string queryCacheName) properties); } - private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy( - string cacheRegion, + private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy(string cacheRegion, string strategy, bool isMutable, + string entityName, Dictionary, ICacheConcurrencyStrategy> caches) { if (strategy == null || !settings.IsSecondLevelCacheEnabled) @@ -462,7 +464,7 @@ private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy( cache = CacheFactory.CreateCache(strategy, GetCache(cacheRegion), settings); caches.Add(cacheKey, cache); if (isMutable && strategy == CacheFactory.ReadOnly) - log.Warn("read-only cache configured for mutable: {0}", name); + log.Warn("read-only cache configured for mutable: {0}", entityName); return cache; }