Bag with linq command First, EF Core 3.0.0

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
pautovartem
Posts: 3
Joined: Fri 15 Nov 2019 12:26

Bag with linq command First, EF Core 3.0.0

Post by pautovartem » Fri 15 Nov 2019 12:35

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

pautovartem
Posts: 3
Joined: Fri 15 Nov 2019 12:26

Re: Bag with linq command First, EF Core 3.0.0

Post by pautovartem » Fri 15 Nov 2019 13:36

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

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

Re: Bag with linq command First, EF Core 3.0.0

Post by Shalex » Sat 16 Nov 2019 15:58

The issue is fixed. The internal build with the fix is available at https://download.devart.com/nuget_oracle_9_9_883.zip.

pautovartem
Posts: 3
Joined: Fri 15 Nov 2019 12:26

Re: Bag with linq command First, EF Core 3.0.0

Post by pautovartem » Mon 18 Nov 2019 12:10

Thanks)

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

Re: Bag with linq command First, EF Core 3.0.0

Post by Shalex » Thu 21 Nov 2019 18:43

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.

Post Reply