You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moreover, even if you fixed this by iterating orderClause, it would still be incorrect because it's a Dictionary<string, bool>. When the query string is parsed, each column in orderby is put into a Dictionary but Dictionary doesn't guarantee iteration order. So as soon as it's parsed, the ordering of orderby fields is lost.
The text was updated successfully, but these errors were encountered:
I have a bug with multi-column sort in my project and looking at the code it seems that the order of multiple fields is not respected.
If you look here at the loop that applies sort:
AutoQueryable/src/AutoQueryable/Helpers/QueryBuilder.cs
Line 273 in 1383b3d
You will notice that the ordering of
columns
is in fact the order of declared properties on the type:AutoQueryable/src/AutoQueryable/Helpers/QueryBuilder.cs
Line 256 in 1383b3d
Moreover, even if you fixed this by iterating
orderClause
, it would still be incorrect because it's aDictionary<string, bool>
. When the query string is parsed, each column inorderby
is put into aDictionary
butDictionary
doesn't guarantee iteration order. So as soon as it's parsed, the ordering oforderby
fields is lost.The text was updated successfully, but these errors were encountered: