Skip to content

Commit fff7696

Browse files
Alexander KotAlexander Kot
authored andcommitted
More intern's
1 parent 10e7523 commit fff7696

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/NHibernate/Persister/Entity/AbstractEntityPersister.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,14 +2376,14 @@ protected void InitSubclassPropertyAliasesMap(PersistentClass model)
23762376
{
23772377
if (entityMetamodel.HasNonIdentifierPropertyNamedId)
23782378
{
2379-
subclassPropertyAliases[EntityPersister.EntityID + "." + idPropertyNames[i]] = new string[] { idAliases[i] };
2380-
subclassPropertyColumnNames[EntityPersister.EntityID + "." + IdentifierPropertyName + "." + idPropertyNames[i]] = new string[] { idColumnNames[i] };
2379+
subclassPropertyAliases[string.Intern(EntityPersister.EntityID + "." + idPropertyNames[i])] = new string[] { idAliases[i] };
2380+
subclassPropertyColumnNames[string.Intern(EntityPersister.EntityID + "." + IdentifierPropertyName + "." + idPropertyNames[i])] = new string[] { idColumnNames[i] };
23812381
}
23822382
// if (hasIdentifierProperty() && !ENTITY_ID.equals( getIdentifierPropertyName() ) ) {
23832383
if (HasIdentifierProperty)
23842384
{
2385-
subclassPropertyAliases[IdentifierPropertyName + "." + idPropertyNames[i]] = new string[] { idAliases[i] };
2386-
subclassPropertyColumnNames[IdentifierPropertyName + "." + idPropertyNames[i]] = new string[] { idColumnNames[i] };
2385+
subclassPropertyAliases[string.Intern(IdentifierPropertyName + "." + idPropertyNames[i])] = new string[] { idAliases[i] };
2386+
subclassPropertyColumnNames[string.Intern(IdentifierPropertyName + "." + idPropertyNames[i])] = new string[] { idColumnNames[i] };
23872387
}
23882388
else
23892389
{

src/NHibernate/Tuple/Entity/EntityMetamodel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ private void MapIdentifierPropertyTypes(string path, IType propertyType)
449449
for (var i = 0; i < componentType.PropertyNames.Length; i++)
450450
{
451451
MapIdentifierPropertyTypes(
452-
!string.IsNullOrEmpty(path) ? $"{path}.{componentType.PropertyNames[i]}" : componentType.PropertyNames[i],
452+
!string.IsNullOrEmpty(path) ? string.Intern($"{path}.{componentType.PropertyNames[i]}") : componentType.PropertyNames[i],
453453
componentType.Subtypes[i]);
454454
}
455455
}

0 commit comments

Comments
 (0)