title: How to exclude some fields when listing Grails domain?
body: <p>I'm wondering how can I list Grails domain and exclude some fields at same time. I'm guessing solution must be simple but I just can not see it.</p>
  
  <p>I prepared some example with domain User:</p>
  
  <pre><code>class User implements Serializable {
      String username
      String email
      Date lastUpdated
      String password
      Integer status
  
      static constraints = { }  
  
      static mapping = { }
  }
  </code></pre>
  
  <p>At this point I want to list all users which have status below 2.</p>
  
  <pre><code>render User.findAllByStatusLessThen(2) as JSON
  </code></pre>
  
  <p>I want to render JSON response to clientside without some fields. For example I just want to render users with fields <strong><em>username</em></strong> and <strong><em>lastUpdated</em></strong> so rendered JSON would look like this:</p>
  
  <pre><code>[{"username": "user1", "lastUpdated":"2016-09-21 06:49:46"}, {"username": "user2", "lastUpdated":"2016-09-22 11:24:42"}]
  </code></pre>
  
  <p>What's the easiest way to achieve that?</p>