Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1454

Support multiple sorting fields in different directions in one sort parameter

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.2 M2 (Moore)
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      Add support for multiple fields and sorting in different directions, while supporting direct use of database fields. If the last string is asc|desc, it is the default sort direction:

      field1_name desc, field2_name asc, field3Name desc ==>field1Name desc, field2Name asc, field3Name desc
      field1_name, field2_name, desc ==>field1Name desc, field2Name desc
      field1_name, field2_name asc, field3Name, desc ==>field1Name desc, field2Name asc, field3Name desc

       

      several reasons:

      1. First of all, can be compatible with the original format
      2. Second, sometimes the page does not allow multiple sort parameters to be passed in, because this means that the dom structure needs to be dynamically added.
      3. Third, the new format (field name and sort syntax) is more in line with the habit of SQL.

       

        Attachments

          Activity

            People

            • Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              andyslin linjisong
              Last updater:
              linjisong
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: