@@ -277,6 +277,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
277
277
model . RootClazz . CacheRegionName ,
278
278
model . CacheConcurrencyStrategy ,
279
279
model . IsMutable ,
280
+ model . EntityName ,
280
281
caches ) ;
281
282
var cp = PersisterFactory . CreateClassPersister ( model , cache , this , mapping ) ;
282
283
entityPersisters [ model . EntityName ] = cp ;
@@ -302,6 +303,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
302
303
model . CacheRegionName ,
303
304
model . CacheConcurrencyStrategy ,
304
305
model . Owner . IsMutable ,
306
+ model . OwnerEntityName ,
305
307
caches ) ;
306
308
var persister = PersisterFactory . CreateCollectionPersister ( model , cache , this ) ;
307
309
collectionPersisters [ model . Role ] = persister ;
@@ -463,10 +465,10 @@ private IQueryCache BuildQueryCache(string queryCacheName)
463
465
properties ) ;
464
466
}
465
467
466
- private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy (
467
- string cacheRegion ,
468
+ private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy ( string cacheRegion ,
468
469
string strategy ,
469
470
bool isMutable ,
471
+ string entityName ,
470
472
Dictionary < Tuple < string , string > , ICacheConcurrencyStrategy > caches )
471
473
{
472
474
if ( strategy == null || strategy == CacheFactory . Never || ! settings . IsSecondLevelCacheEnabled )
@@ -479,7 +481,7 @@ private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy(
479
481
cache = CacheFactory . CreateCache ( strategy , GetCache ( cacheRegion ) , settings ) ;
480
482
caches . Add ( cacheKey , cache ) ;
481
483
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 ) ;
483
485
484
486
return cache ;
485
487
}
0 commit comments