title: Retrieving children from a particular parent for display on a select component
body: <p>I have a parent-child domain-class relation in Grails as shown, and I want to retrieve all the children of one specific parent object in order to display them in a HTML select component for the user to pick. </p>
  
  <pre><code>class Parent { 
  static hasMany = [children: child]
  }
  
  class child {
  string name 
  Parent parent
  static belongsTo = [Parent]
  }
  </code></pre>
  
  <p>I know I should use a Grails' select tag of the form:</p>
  
  <pre><code>&lt;g:select name="user.company.id"
        from="${parent}"
        value="${user?.company.id}"
        optionKey="id" /&gt;
  </code></pre>
  
  <p>I tried doing this, but it does not seem to work:</p>
  
  <pre><code>&lt;g:select name="child.id"
        from="${the parent.children}"
        optionKey="id" /&gt;
  </code></pre>
  
  <p>Any suggestions on what the correct syntax is? Thanks</p>