Skip to content

Commit 37e8302

Browse files
committed
Make SessionFactoryImpl.imports a ReadOnlyDictionary to line up with how collectionMetadata is built and improve determistic behavior under accidental multithreading
1 parent 401377b commit 37e8302

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NHibernate/Impl/SessionFactoryImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void HandleEntityNotFound(string entityName, string propertyName, object
141141
private readonly Dictionary<string, IIdentifierGenerator> identifierGenerators;
142142

143143
[NonSerialized]
144-
private readonly Dictionary<string, string> imports;
144+
private readonly IDictionary<string, string> imports;
145145

146146
[NonSerialized]
147147
private readonly IInterceptor interceptor;
@@ -357,7 +357,7 @@ public SessionFactoryImpl(Configuration cfg, IMapping mapping, Settings settings
357357
sqlResultSetMappings = new Dictionary<string, ResultSetMappingDefinition>(cfg.SqlResultSetMappings);
358358
#endregion
359359

360-
imports = new Dictionary<string, string>(cfg.Imports);
360+
imports = new ReadOnlyDictionary<string, string>(cfg.Imports);
361361

362362
#region after *all* persisters and named queries are registered
363363
foreach (IEntityPersister persister in entityPersisters.Values)

0 commit comments

Comments
 (0)