oracle / dotnet-db-samples

.NET code samples for Oracle database developers #OracleDotNet
http://otn.oracle.com/dotnet
MIT License
413 stars 191 forks source link

EF Core 6 - Difference between two Date columns #250

Closed kakone closed 1 year ago

kakone commented 2 years ago

The bug #84 is back with Oracle EF Core 6. :angry:

When I do

var days = (from r in dbContext.Blogs select (DateTime.Now - r.CreationDate).Days).FirstOrDefault();

I get a System.InvalidCastException: 'Unable to cast object of type 'System.Decimal' to type 'System.TimeSpan'.' I updated the project that reproduces the bug.

alexkeh commented 2 years ago

Thanks for reporting this issue. I've been able to reproduce the error from your test case. I've filed bug 34479760 to track this issue and have a dev team member fix it.

kakone commented 2 years ago

Is there any chance to have a new version of the NuGet package with the fix this month ?

alexkeh commented 2 years ago

ODP.NET has a cumulative patch once a quarter. We'll release a second time during a quarter if there is new functionality ready out of band, such as new .NET version support. As the last quarterly patch was released in early August, the next cumulative patch won't arrive until around early November.

If you need a fix soon, open an Oracle Support request and request an one-off patch. If you don't have an Oracle Support account, ask your DBA to open one on your behalf.

kakone commented 2 years ago

I opened an Oracle Support and requested a patch. Unfortunately, I still haven't got anything except a "Development team is working on the bug". This bug is problematic for us, we would like to have a correction.

alexkeh commented 2 years ago

A patch hasn't been created yet for this bug. The bug is still in the dev team's work queue.

kakone commented 1 year ago

2 months later, no information from Oracle support, we don't know when this bug will be fixed (and if it ever will be). I have never seen such bad support. Bugs don't bother the dev team apparently.

alexkeh commented 1 year ago

21.8 is now available with the fix. https://www.nuget.org/packages/Oracle.EntityFrameworkCore/7.21.8

kakone commented 1 year ago

4 months later, incredible. You just got the worst support ever trophy from me.

alexkeh commented 1 year ago

Sorry, this bug correlated with the busiest time of year for our EF Core team. The EF Core 7 architecture changed quite a bit in the last few months, which kept us busy. We plan to deliver the Oracle EF Core 6 bug fix during the first half of January on NuGet Gallery.