Devart 9.11.980 broken logic with datetime
Posted: Sun 10 May 2020 10:09
We updated to 9.11.980 a few days ago, and immediately stumbled on the following issue:
Version 9.11.980
Version 9.10.909
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.
Code: Select all
var items = _context.Items.Where(i => i.type == "MyType" && now < i.DeliveryDate && now >= i.OrderDate).ToList();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)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)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.