LINQ-to-ORACLE error in Take() statement

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
mars
Posts: 17
Joined: Tue 14 Jul 2009 13:56

LINQ-to-ORACLE error in Take() statement

Post by mars » Tue 18 Aug 2009 17:18

Hello!

There is the simple code fragment:

var query =
from a in Context.CUSTOMER
orderby a.INTCODE
select a.INTCODE;

foreach (var item in query.Take(10))
System.Diagnostics.Debug.WriteLine(item);

wich translate to following uncorrect SQL:
SELECT
"Extent1".INTCODE AS INTCODE
FROM PXBANK.CUSTOMER "Extent1"
WHERE ROWNUM <= (10)
ORDER BY "Extent1".INTCODE ASC
This sql doesn't really get first ten records (ROWNUM statement applied before any sortings).

dotConnect for Oracle 5.25.39

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 19 Aug 2009 10:44

Thank you for the report.
I have reproduced the problem with our Entity Framework support (not LINQ to Oracle,
the problem is not reproducible using our LINQ to Oracle implementation).
I will let you know about the results of our investigation.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 23 Sep 2009 08:05

We have fixed the problem. The fix will be included in the next build of dotConnect for Oracle.

Post Reply