Page 1 of 1

LINQ-to-ORACLE error in Take() statement

Posted: Tue 18 Aug 2009 17:18
by mars
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

Posted: Wed 19 Aug 2009 10:44
by AndreyR
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.

Posted: Wed 23 Sep 2009 08:05
by AndreyR
We have fixed the problem. The fix will be included in the next build of dotConnect for Oracle.