title: Grails: How to query objects in many to many mapping?
body: <p>Hello I have the follwing domain classes.</p>
  
  <pre><code>class Student {
     int age
     static hasMany = [courses:Course]
  }
  
  class Course {
     String name
     static hasMany = [students:Student]
  }
  </code></pre>
  
  <p>I want to find the Students taking Course (with id 1), with age 7.</p>
  
  <p>Could I do that with dynamic finder or criteria builder or HQL?</p>
  
  <p>I do not want to do following as it load all students so inefficient:</p>
  
  <pre><code>def course = Course.get(1);
  course.students.findAll{ it.age == 7 }
  </code></pre>