Page 1 of 1

incorrect SQL code generation

Posted: Tue 20 Jul 2010 15:34
by AlexanderFar
Hello guys.
I work with dotConnect for MySQL and found a problem.
I write this code

Code: Select all

context.Users
.Where(u => u.FirstName == "D")
.OrderBy(u => u.Email)
.Skip(100).Take(200)
.Where(u => u.LastName == "A").OrderBy(u => u.Password)
.ToList()
and have SQL:

Code: Select all

SELECT * FROM
    ( SELECT * FROM test3.users AS Extent1
        WHERE 'D' = Extent1.firstName
        limit 100,200
)  AS Limit1
WHERE 'A' = Limit1.lastName
ORDER BY Limit1.`password` ASC
There hasn't sorting by the field "email" before pagination

Please take me answer ASAP.
Thanks.

Posted: Thu 22 Jul 2010 12:07
by AndreyR
This problem seems to be the one described in the MSDN Entity Framework Known Issues list (SKIP Operator section).
We will investigate the possibility of fixing it.

Posted: Thu 03 Mar 2011 17:41
by AndreyR
We have fixed this problem. The fixed build will be available in a week or so.

Posted: Mon 14 Mar 2011 15:18
by AndreyR
The new 6.10.121 build of dotConnect for MySQL is available for download.
It is available here (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to this post.