The DB2400Dialect inherits from DB2Dialect and at some point, the DB2Dialect.ToStringLiteral method was updated to handle unicode, especially the part
if (isUnicode)
literal.Insert(0, "U&");
However, the IBM .Net drivers for the "DB2 for i" database can't cope with the "U&" prefix, which leads on some occasions (amongst them the usage of DiscriminatorValue in the mapping) to DB-failures.
I suggest to re-override the ToStringLiteral in the DB2400Dialect class, this time without the "isUnicode" part
See Pull request
The DB2400Dialect inherits from DB2Dialect and at some point, the DB2Dialect.ToStringLiteral method was updated to handle unicode, especially the part
However, the IBM .Net drivers for the "DB2 for i" database can't cope with the "U&" prefix, which leads on some occasions (amongst them the usage of DiscriminatorValue in the mapping) to DB-failures.
I suggest to re-override the ToStringLiteral in the DB2400Dialect class, this time without the "isUnicode" part
See Pull request