Bug in generated SQL when casting EF Core model decimal-column to long in C# LINQ
Posted: Tue 03 Dec 2019 14:37
We are getting an OracleException "ORA-00902: Invalid Datatype" error in the SQL generated by Devart (we are using the latest version, 9.9.887) when casting a decimal-column in an EF Core model to the "long" type in a C# LINQ query.
Becomes the following SQL:
Seeing as "AS int64" is not valid Oracle SQL (at least in our 19c-versioned databases), this is a bit of an issue.
We look forward to the fix to this problem :)
Code: Select all
using (var db = new MyDbContext())
{
var res = db.MyDbSet.Select(x => new { ID = (long)x.Id }).ToList();
}
Code: Select all
SELECT CAST("x".ID AS int64) AS ID
FROM MY_TABLE "x"
We look forward to the fix to this problem :)