Page 1 of 1

Bag with linq command First, EF Core 3.0.0

Posted: Fri 15 Nov 2019 12:35
by pautovartem
Hello.

I have a problem with EF Core 3.0.0, Devart.Data.Oracle.EFCore 9.9.872 and Oracle 11g.
When i call method First() provider generate a wrong sql script.
Example:
C# code:

Code: Select all

context.DbSystemInformation.AsNoTracking().First()
Generated SQL script:

Code: Select all

SELECT t.bookmark, ...
FROM (
    SELECT s.bookmark, ...
    FROM SYSTEM s
    ORDER BY (SELECT 1)
) t
WHERE ROWNUM <= 1

Re: Bag with linq command First, EF Core 3.0.0

Posted: Fri 15 Nov 2019 13:36
by pautovartem
SQL generated at another version.

EF Core 2.1.11, Devart.Data.Oracle.EFCore 9.6.646, Oracle 11g

Code: Select all

SELECT s.bookmark, ...
FROM SYSTEM s
WHERE (ROWNUM) <= 1
EF Core 3.0.0, Devart.Data.Oracle.EFCore 9.9.872 and Oracle 12

Code: Select all

SELECT s.bookmark, ...
FROM SYSTEM s
FETCH FIRST 1 ROWS ONLY

Re: Bag with linq command First, EF Core 3.0.0

Posted: Sat 16 Nov 2019 15:58
by Shalex
The issue is fixed. The internal build with the fix is available at https://download.devart.com/nuget_oracle_9_9_883.zip.

Re: Bag with linq command First, EF Core 3.0.0

Posted: Mon 18 Nov 2019 12:10
by pautovartem
Thanks)

Re: Bag with linq command First, EF Core 3.0.0

Posted: Thu 21 Nov 2019 18:43
by Shalex
The bug with the redundant empty ORDER BY clause in a subquery, when paging is used, in EF Core 3 is fixed: viewtopic.php?f=1&t=39576.