File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ public DB2Dialect()
55
55
RegisterColumnType ( DbType . String , 8000 , "VARCHAR($l)" ) ;
56
56
RegisterColumnType ( DbType . String , 2147483647 , "CLOB" ) ;
57
57
RegisterColumnType ( DbType . Time , "TIME" ) ;
58
+ RegisterColumnType ( DbType . Guid , "CHAR(16) FOR BIT DATA" ) ;
58
59
59
60
RegisterFunction ( "abs" , new StandardSQLFunction ( "abs" ) ) ;
60
61
RegisterFunction ( "absval" , new StandardSQLFunction ( "absval" ) ) ;
Original file line number Diff line number Diff line change 2
2
using System . Data ;
3
3
using System . Data . Common ;
4
4
using NHibernate . Engine ;
5
+ using NHibernate . SqlTypes ;
5
6
6
7
namespace NHibernate . Driver
7
8
{
@@ -47,7 +48,15 @@ public override IResultSetsCommand GetResultSetsCommand(ISessionImplementor sess
47
48
48
49
protected override void InitializeParameter ( DbParameter dbParam , string name , SqlType sqlType )
49
50
{
50
- dbParam . DbType = sqlType . DbType ;
51
+ switch ( sqlType . DbType )
52
+ {
53
+ case DbType . Guid :
54
+ dbParam . DbType = DbType . Binary ;
55
+ break ;
56
+ default :
57
+ dbParam . DbType = sqlType . DbType ;
58
+ break ;
59
+ }
51
60
}
52
61
}
53
62
}
You can’t perform that action at this time.
0 commit comments