| Working with DB2 (on z/OS) with DB2400Dialect (and I presume DB2 UDB with DB2Dialect).
 When using union-subclass where some tables have additional columns, NHibernate correctly adds the missing columns to the other tables and attempts to set them to null using:
 
 SELECT null as <column>
 
 For DB2, this is invalid syntax and should be:
 
 SELECT cast(null as <type>) as <column>
 
 I noticed some logic in the Oracle dialect and copied it to the DB2 dialect:
 
 public override string GetSelectClauseNullString(SqlType sqlType)
 {
 return "cast(null as " + GetTypeName(sqlType) + ")";
 }
 
 Now my problem is fixed, but is there any possibility of getting this into the main build so I don't have to keep updating. I'm not sure what the process is.
 
 Thanks
 
 
 |