Devart 9.11.980 broken logic with datetime

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
TheCoolest
Posts: 22
Joined: Tue 24 Mar 2020 11:02

Devart 9.11.980 broken logic with datetime

Post by TheCoolest » Sun 10 May 2020 10:09

We updated to 9.11.980 a few days ago, and immediately stumbled on the following issue:

Code: Select all

var items = _context.Items.Where(i => i.type == "MyType" && now < i.DeliveryDate && now >= i.OrderDate).ToList();
Version 9.11.980

Code: Select all

2020-05-10 11:47:38,308 [26962] [16] DEBUG Microsoft.EntityFrameworkCore.Database.Command - Executing DbCommand [Parameters=[p__now_0='2020-05-10T11:47:36' (DbType = DateTime)], CommandType='Text', CommandTimeout='0']
SELECT *
FROM ITEMS "i"
WHERE (("i".ITEM_TYPE = 'MyType') AND ("i".ITEM_DELIVERY_DATE < :p__now_0)) AND ("i".ITEM_ORDER_DATE >= :p__now_0)
Version 9.10.909

Code: Select all

Version 9.10.909
2020-05-10 12:04:03,845 [27628] [27] DEBUG Microsoft.EntityFrameworkCore.Database.Command - Executing DbCommand [Parameters=[p__now_0='2020-05-10T12:04:02' (DbType = DateTime)], CommandType='Text', CommandTimeout='0']
SELECT *
FROM ITEMS "i"
WHERE (("i".ITEM_TYPE = 'MyType') AND (:p__now_0 < "i".ITEM_DELIVERY_DATE)) AND (:p__now_0 >= "i".ITEM_ORDER_DATE)
You can see that the parameter and column have swapped places in the new version, this completely breaks the logic of the query.
I've tested version 9.11.951 and it has the same issue, 9.10.909 is the last version that works correctly.

I don't know whether this issue is specific to datetime types or not, as we were unable to test much else with this issue present in our system and have reverted back to the older version for now.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Devart 9.11.980 broken logic with datetime

Post by Shalex » Tue 12 May 2020 17:11

The bug with the opposite order of operands in case of less than, more than operators in the Where clause of LINQ query in EF Core 3 is fixed. We will notify you when the new public build of dotConnect for Oracle is available for download.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Devart 9.11.980 broken logic with datetime

Post by Shalex » Sat 20 Jun 2020 17:48

New build of dotConnect for Oracle 9.11.1034 is available for download: viewtopic.php?f=1&t=41287.

Post Reply