@@ -270,6 +270,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
270
270
model . RootClazz . CacheRegionName ,
271
271
model . CacheConcurrencyStrategy ,
272
272
model . IsMutable ,
273
+ model . EntityName ,
273
274
caches ) ;
274
275
var cp = PersisterFactory . CreateClassPersister ( model , cache , this , mapping ) ;
275
276
entityPersisters [ model . EntityName ] = cp ;
@@ -290,6 +291,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
290
291
model . CacheRegionName ,
291
292
model . CacheConcurrencyStrategy ,
292
293
model . Owner . IsMutable ,
294
+ model . OwnerEntityName ,
293
295
caches ) ;
294
296
var persister = PersisterFactory . CreateCollectionPersister ( model , cache , this ) ;
295
297
collectionPersisters [ model . Role ] = persister ;
@@ -446,10 +448,10 @@ private IQueryCache BuildQueryCache(string queryCacheName)
446
448
properties ) ;
447
449
}
448
450
449
- private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy (
450
- string cacheRegion ,
451
+ private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy ( string cacheRegion ,
451
452
string strategy ,
452
453
bool isMutable ,
454
+ string entityName ,
453
455
Dictionary < Tuple < string , string > , ICacheConcurrencyStrategy > caches )
454
456
{
455
457
if ( strategy == null || ! settings . IsSecondLevelCacheEnabled )
@@ -462,7 +464,7 @@ private ICacheConcurrencyStrategy GetCacheConcurrencyStrategy(
462
464
cache = CacheFactory . CreateCache ( strategy , GetCache ( cacheRegion ) , settings ) ;
463
465
caches . Add ( cacheKey , cache ) ;
464
466
if ( isMutable && strategy == CacheFactory . ReadOnly )
465
- log . Warn ( "read-only cache configured for mutable: {0}" , name ) ;
467
+ log . Warn ( "read-only cache configured for mutable: {0}" , entityName ) ;
466
468
467
469
return cache ;
468
470
}
0 commit comments