linq2db / linq2db.EntityFrameworkCore

Bring power of Linq To DB to Entity Framework Core projects
MIT License
449 stars 39 forks source link

"ORA-01704 string literal too long" exception generated when trying to "upsert" BLOB type column in Oracle #372

Open abrasat opened 8 months ago

abrasat commented 8 months ago

My application uses the InsertWhenNotMatched/UpdateWhenMatched combination to insert or update a BLOB type column in a Oracle. When the blob size exceeds 4000 bytes, the exception "ORA-01704 string literal too long" is thrown. It looks that Linq2Db tries to insert blob as char array (it is declared as byte array in the c# class mapping the Oracle table). If I use directly EF Core with Add and SaveChanges methods to insert for instance a record, the BLOB column is written correctly, even if the byte array has the size greater than 4000.