@@ -277,6 +277,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
277277 model . RootClazz . CacheRegionName ,
278278 model . CacheConcurrencyStrategy ,
279279 model . IsMutable ,
280+ model . EntityName ,
280281 caches ) ;
281282 var cp = PersisterFactory . CreateClassPersister ( model , cache , this , mapping ) ;
282283 entityPersisters [ model . EntityName ] = cp ;
@@ -302,6 +303,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
302303 model . CacheRegionName ,
303304 model . CacheConcurrencyStrategy ,
304305 model . Owner . IsMutable ,
306+ model . OwnerEntityName ,
305307 caches ) ;
306308 var persister = PersisterFactory . CreateCollectionPersister ( model , cache , this ) ;
307309 collectionPersisters [ model . Role ] = persister ;
@@ -463,10 +465,10 @@ private IQueryCache BuildQueryCache(string queryCacheName)
463465 properties ) ;
464466 }
465467
466- private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy (
467- string cacheRegion ,
468+ private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy ( string cacheRegion ,
468469 string strategy ,
469470 bool isMutable ,
471+ string entityName ,
470472 Dictionary < Tuple < string , string > , ICacheConcurrencyStrategy > caches )
471473 {
472474 if ( strategy == null || strategy == CacheFactory . Never || ! settings . IsSecondLevelCacheEnabled )
@@ -479,7 +481,7 @@ private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy(
479481 cache = CacheFactory . CreateCache ( strategy , GetCache ( cacheRegion ) , settings ) ;
480482 caches . Add ( cacheKey , cache ) ;
481483 if ( isMutable && strategy == CacheFactory . ReadOnly )
482- log . Warn ( "read-only cache configured for mutable: {0}" , name ) ;
484+ log . Warn ( "read-only cache configured for mutable: {0}" , entityName ) ;
483485
484486 return cache ;
485487 }
0 commit comments