Uploaded image for project: 'Spring Data MongoDB'
  1. Spring Data MongoDB
  2. DATAMONGO-323

Using @Query and a Sort parameter on the same method should produce sorted results

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 M5
    • Fix Version/s: 1.0 RC1
    • Component/s: Core

      Description

      For a given @Query annotated method it would be useful to also be able to define how the result is sorted by passing a Sort parameter to the query method rather than having to embed the sort order in the @Query string.

      Please also see http://stackoverflow.com/questions/7753243/adding-sort-to-mongo-json-query-with-spring-data-repository

      There is no compilation or runtime error; the Sort is just not applied.

        Attachments

          Activity

            People

            Assignee:
            olivergierke Oliver Drotbohm
            Reporter:
            andybailey Andrew Bailey
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: