1

I have a requirement in which i need to sort a table on the basis of two columns.

  1. for the first column, all the null values should be at last, without any sort
  2. for the second column, it should be in descending order.

after sorting on the basis of second column, null values of first column should be at last only.

i tried passing multiple order in orderBy method of Criteria Builder. it is putting null values at last, but it only sorting on the basis of "column 2" if two rows have same "column 1" value. I was expecting it to sort on the basis of column 2 irrespective of column 1

saket
  • 41
  • 2

0 Answers0