title: How to change columns order in generated table (grails constraints not working with mongodb plugin)
body: <p>I'm using Grails 2.1.1 with mongodb plugin. I have problem with changing order of columns in generated list. As <a href="http://grails.org/doc/latest/guide/scaffolding.html" rel="nofollow">grails scaffolding guide</a> says you need only properly order attributes in contraints block. </p>
  
  <p>My domain:</p>
  
  <pre><code>class Section {
  
  String idName
  String visible
  String required
  String name
  String bold
  
  static embedded = ['question']
  
  List&lt;Question&gt; questions
  static hasMany = [questions : Question]
  
  static constraints = {
      idName (blank: false)
      name (blank: false)
      visible (blank: false)
      required (blank: false)
      bold (blank: false)
  }
  
  @Override
  public String toString() {
      name
  }
  }
  </code></pre>
  
  <p>but columns are still ordered alphabetically. I'm using static scaffolding, so after changes in constraints i use <code>grails generate-all *</code> command and override all files.</p>
  
  <p>And yes, I tried cleaning and compiling code, also cleaning and restarting server (this integrated with STS) and cleaning browser cache. Is there problem with mongo database (hibernate plugin is uninstalled)?</p>
  
  <p>After that I also installed grails templates. In list.gsp there is line with sorting attributes:</p>
  
  <pre><code>Collections.sort(props, comparator.constructors[0].newInstance([domainClass] as Object[]))
  </code></pre>
  
  <p>Any idea how can i change this to get working order that I set in constraints?</p>