Skip to content

Commit

Permalink
Fix sorting by association attribute if the have null value #121
Browse files Browse the repository at this point in the history
  • Loading branch information
plakhov committed Oct 8, 2020
1 parent 5aeb2d7 commit ef729e5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ protected String addOrderBy(String queryString, @Nullable String sort, MetaClass
if (propertyPath != null) {
switch (order) {
case "-":
order = " desc, ";
order = " desc NULLS LAST, ";
break;
case "+":
default:
order = " asc, ";
order = " asc NULLS FIRST, ";
break;
}
MetaProperty metaProperty = propertyPath.getMetaProperty();
Expand Down

0 comments on commit ef729e5

Please sign in to comment.