File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/NHibernate/Dialect/Schema Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,19 @@ public override ISet<string> GetReservedWords()
37
37
38
38
var dtTypes = Connection . GetSchema ( DbMetaDataCollectionNames . DataTypes ) ;
39
39
40
- var typeNameColumn = dtTypes . Columns . Cast < DataColumn > ( )
41
- . FirstOrDefault ( column => column . ColumnName == "SQL_TYPE_NAME" ) ;
40
+ var typeNameColumnIndex = dtTypes . Columns . IndexOf ( "SQL_TYPE_NAME" ) ;
42
41
43
- if ( typeNameColumn == null ) //todo We can try to fallback to "TypeName" columnName
44
- return result ;
42
+ if ( typeNameColumnIndex == - 1 )
43
+ {
44
+ typeNameColumnIndex = dtTypes . Columns . IndexOf ( "TypeName" ) ;
45
+
46
+ if ( typeNameColumnIndex == - 1 )
47
+ return result ;
48
+ }
45
49
46
50
foreach ( DataRow row in dtTypes . Rows )
47
51
{
48
- result . Add ( row [ typeNameColumn ] . ToString ( ) ) ;
52
+ result . Add ( row [ typeNameColumnIndex ] . ToString ( ) ) ;
49
53
}
50
54
51
55
return result ;
You can’t perform that action at this time.
0 commit comments