Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrderBy有时会失效 #62

Closed
herubber opened this issue May 29, 2018 · 3 comments
Closed

OrderBy有时会失效 #62

herubber opened this issue May 29, 2018 · 3 comments

Comments

@herubber
Copy link

最近发现使用的OrderBy方法最后生成的sql会是row_number的order by,再between RowIndex分页的。
但测试sql语句发现rowIndex不是按顺序排列的,所以最后结果经常不是希望要的排序。能否在最后生成的sql加入order RowIndex呢?

@herubber
Copy link
Author

测试例子的截图如下:
image

@DotNetNext
Copy link
Owner

这个暂时米法解决 。。只能算SQLSEVER BUG

@herubber
Copy link
Author

我暂时在QueryBuilder.PageTempalte 返回前加了 Order By RowIndex,不知道会有什么后遗症。
stackoverflow 看别人也是order by row_number 解决的:
https://stackoverflow.com/questions/6890473/order-by-row-number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants