problem with Take on Query

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
wgkwvl
Posts: 39
Joined: Tue 20 Jul 2010 15:13

problem with Take on Query

Post by wgkwvl » Thu 24 Mar 2011 12:13

Hi,

I have following query :

var qry = context.patients.where(p=> X || Y); ( X and Y are some conditions ).

I want the query to return the first 51 rows,
so i return :
return qry.Take(51).ToList();

but the result is some 27000 records, because the generated sql is :
select ... from patientens where X or Y and rownum <= 51
instead of
select ... from patientens where (X or Y) and rownum <= 51

this does not seem correct behaviour to me .

greetings

Stijn

wgkwvl
Posts: 39
Joined: Tue 20 Jul 2010 15:13

Post by wgkwvl » Thu 24 Mar 2011 12:16

Explicitly adding parentheses around my or statement does not solve the problem :
var qry = context.patients.where(p=> ( X || Y) ); ( X and Y are some conditions ).
return qry.Take(51).ToList();

the same sql is generated

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

Post by AndreyR » Fri 25 Mar 2011 12:46

Thank you for the report, I have reproduced the issue. We will let you know as soon as the problem is solved.

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

Post by AndreyR » Mon 04 Apr 2011 16:41

We have fixed this error. The fixed build will be available in a week or so.

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

Post by AndreyR » Thu 07 Apr 2011 13:07

The new build of dotConnect for Oracle 6.10.135 is available for download now. This build fixes the problem.
It can be downloaded from Download Page (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to this post.

Post Reply