title: How to sort by multiple fields in Grails?
body: <p>I have a list that need to be sorted by 3 different fields. If it were a query I could do something like:</p>
  
  <pre><code>and {
      invoiceTicketDetail {
          order('date', 'asc')
          order('xrefCode', 'asc')
      }
      order('lineType')
  }
  </code></pre>
  
  <p>But I already have the list like the following:</p>
  
  <pre><code>List&lt;InvoiceDetail&gt; invoiceDetailList = invoiceHeader.invoiceDetails.findAll {it.deleted==Boolean.FALSE &amp;&amp; it.amount!=0} as List
  </code></pre>
  
  <p>How can I order to get the same result from the first one? The thing is we have two different ways to display the information. One to print on screen and one to generate a report. Both of them must show the information in the same sort.</p>