Skip to content

Incompatible unicode string literals with DB2400Dialect #3738

@staikfrite

Description

@staikfrite

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions