Skip to content

Commit 20a7a44

Browse files
committed
DataTypeCollection: Adding provider specific types fix
- no double IsLocked check - custom types and they native name alternatives are added to collections properly
1 parent 27da6cc commit 20a7a44

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Orm/Xtensive.Orm/Sql/Info/DataTypeCollection.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ public DataTypeInfo this[SqlType sqlType]
5757
public void Add(SqlType sqlType, DataTypeInfo dataTypeInfo)
5858
{
5959
this.EnsureNotLocked();
60-
if (!IsLocked)
61-
sqlTypes.Add(sqlType, dataTypeInfo);
60+
sqlTypes.Add(sqlType, dataTypeInfo);
61+
foreach (var nativeType in dataTypeInfo.NativeTypes) {
62+
nativeTypes.Add(nativeType, dataTypeInfo);
63+
}
6264
}
6365

6466
/// <summary>

0 commit comments

Comments
 (0)