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()
3737
3838 var dtTypes = Connection . GetSchema ( DbMetaDataCollectionNames . DataTypes ) ;
3939
40- var typeNameColumn = dtTypes . Columns . Cast < DataColumn > ( )
41- . FirstOrDefault ( column => column . ColumnName == "SQL_TYPE_NAME" ) ;
40+ var typeNameColumnIndex = dtTypes . Columns . IndexOf ( "SQL_TYPE_NAME" ) ;
4241
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+ }
4549
4650 foreach ( DataRow row in dtTypes . Rows )
4751 {
48- result . Add ( row [ typeNameColumn ] . ToString ( ) ) ;
52+ result . Add ( row [ typeNameColumnIndex ] . ToString ( ) ) ;
4953 }
5054
5155 return result ;
You can’t perform that action at this time.
0 commit comments