title: using createCriteria with order based on a belongsTo property
body: <p>I have the next scheme:</p>
  
  <pre><code>class UserProfile {
      String title
      String firstName
      String lastName 
      static belongsTo = [user:User]
      static constraints = {
              user nullable:true , unique:true
              title nullable:true, blank:true
              firstName blank:false
              lastName nullable:true, blank:true
      }
  }
  
  class User {
      String username
      String password
      boolean enabled 
      String email    
      static constraints = {
          username size:6..40, blank:false, nullable: false, unique: true
          email email:true, size:6..40, blank:false, nullable: false, unique: true
          password size:5..64, password:true, blank:false, nullable: false
      }   
      String toString(){username}
  }
  </code></pre>
  
  <p>I need a list of <code>UserProfile</code> ordered by the email that has the user!</p>
  
  <p>I try:</p>
  
  <pre><code>UserProfile.createCriteria().listDistinct({
      if(params.orderBy){
          if(params.orderBy=="email"){
          //the exception says that the element has no such property to both cases    
              order("user.email", ascDesc)
              //order("email", ascDesc)               
          }else{
              order("${params.orderBy}", ascDesc)
          }
      }
  
  })
  </code></pre>
  
  <p>so when I want to order by the email the exception says that the element has no such property to both cases. Note: <code>ascDesc</code> is a variable <code>String</code> it can be <code>asc</code> or <code>desc</code></p>