incorrect SQL code generation

incorrect SQL code generation

Postby AlexanderFar » Tue 20 Jul 2010 15:34

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.
AlexanderFar
 
Posts: 1
Joined: Tue 20 Jul 2010 15:26

Postby AndreyR » Thu 22 Jul 2010 12:07

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.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby AndreyR » Thu 03 Mar 2011 17:41

We have fixed this problem. The fixed build will be available in a week or so.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby AndreyR » Mon 14 Mar 2011 15:18

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.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for MySQL