Code: Select all
if (ServerOptionsConfig.IsOracle)
{
var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
config.CodeFirstOptions.TruncateLongDefaultNames = true;
config.CodeFirstOptions.UseNonLobStrings = true;
config.DatabaseScript.Column.MaxStringSize = Devart.Data.Oracle.Entity.Configuration.OracleMaxStringSize.Extended;
//Nvarchar2(4000) complains on a long value insert because of the unicode default model string
config.CodeFirstOptions.UseNonUnicodeStrings = true;
config.CodeFirstOptions.ColumnTypeCasingConventionCompatibility = true;
config.Workarounds.DisableQuoting = true;
config.QueryOptions.CaseInsensitiveComparison = true;
config.QueryOptions.CaseInsensitiveLike = true;
}
[*]Devart.Data.Oracle.OracleException (0x80004005): ORA-24920: column size too large for client – This is because the select query is failing to get over 2000 characters.
I'm wondering how can I map the string to nvarchar2(4000), without changing the model. ( I might be able to fix by giving stringlength 4000 on the model.) because I have to use this for MS SQL db support as well.
Is there any way that I can handle the situation ( over 2000 bytes) with Nvarchar2(4000) without changing it to unicode ??