Hi - we represent flags in our Oracle database as VARCHAR2(1) - that is, non-unicode - with ‘Y’/'N' values.
I have mapped these to .Net using .HasConversion(new BoolToStringConverter("N", "Y")) on the entity configuration.
This works fine when doing simple queries on the table.
However - this linq query fails with an Oracle Error.
var myList = dbCon.MY_TABLE.Where(x => (x.IN_SERVICE ?? true)).ToList();
It generates the SQL:
SELECT "g"."MY_COLUMN" …
FROM "OWNER"."MY_TABLE" "g"
WHERE COALESCE("g"."IN_SERVICE", N'Y') <> N'N'
I assume this does not like comparing the non-unicode column IN_SERVICE with the unicode literal N'N'.
The error is: 'ORA-12704: character set mismatch'
Is there a workaround for this that you can recommend?
Versions:

Oracle RDBMS: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0