Grails
  1. Grails
  2. GRAILS-3396 Top level task: GORM Improvements
  3. GRAILS-3038

Add support for ordering an object's collections at the SQL / DB level

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.1-beta1
    • Component/s: Persistence
    • Labels:
      None
    • Environment:
      Linux JDK 1.6

      Description

      This would be quite useful in some cases, as currently default sorting can only be done via Java (using a SortedSet and implementing comparable on the collection's entities).

      Hibernate supports this via the OrderBy annotation, so the only work is to create the glue between Grails and Hibernate (this would probably be part of the GORM DSL I guess). I can provide an example Hibernate mapping file for this if needed, or the following links show how to achieve that:

      http://www.hibernate.org/hib_docs/v3/reference/en/html/collections.html#collections-mapping (XML mapping)

      http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#entity-mapping-association-collections (Annotations)

        Issue Links

          Activity

          Hide
          Graeme Rocher added a comment -

          new features go into 1.1

          Show
          Graeme Rocher added a comment - new features go into 1.1

            People

            • Assignee:
              Graeme Rocher
              Reporter:
              Jean-Noël Rivasseau
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development