title: Grails - How to return a collection from a belogsTo relationship with a filter
body: <p>I have a 'User' and a 'UserOrder' class in grails. There is a 'belongsTo' relationship defined on the userOrder class and a hasMany relationship on the 'User' class, like so:</p>
  
  <pre><code>class User {
  
      String username
      String password
  
      static hasMany = [orders:UserOrder]
  
      Set&lt;UserOrder&gt; getUserOrder() {
          return orders.findWhere(status: 0)
      }
  }
  
  class UserOrder {
      User user
      Integer status
  
      static belongsTo = [User]
  }
  </code></pre>
  
  <p>My issue is that the 'getUserOrder' method doesn't work. I just want it to return the first (any) UserOrder with the status set to '0', but when I run the above code, I get the following error:</p>
  
  <pre><code>No signature of method: org.hibernate.collection.PersistentSet.findWhere() is applicable for argument types: (java.util.LinkedHashMap) values: [[status:0]]
  </code></pre>
  
  <p>How do I get the method to just return a UserOrder, belonging to this User with a status of '0'?</p>