title: What is the best way to declare sorted association in grails domain classes?
body: <p>It seems that there are two different ways of declaring <strong>sorted associations</strong> in Grails :</p>
  
  <p><strong>Method 1</strong> (see <a href="http://grails.org/doc/latest/guide/5.%20Object%20Relational%20Mapping%20(GORM).html#5.5.3%20Default%20Sort%20Order" rel="noreferrer">here</a>) using default sort order</p>
  
  <pre><code>class Book {
    String title 
  }
  class Author {
    static hasMany = [books : Book]
    static mapping = { books sort: "title"}
  }
  </code></pre>
  
  <p><strong>Method 2</strong> (see <a href="http://grails.org/doc/latest/guide/5.%20Object%20Relational%20Mapping%20(GORM).html#5.2.4%20Sets,%20Lists%20and%20Maps" rel="noreferrer">here</a>) using SortedSet</p>
  
  <pre><code>class Book implements Comparable {
    String title
    int compareTo(obj) {
      title &lt;=&gt; obj.title
    }
  }
  class Author {
    SortedSet books
    static hasMany = [books : Book]
  }
  </code></pre>
  
  <p>I am not sure which one to use and what is the difference (if any), pros and cons between using one against the other. </p>
  
  <p>I would appreciate any clarification. </p>
  
  <p>Thank you </p>