title: How to access relationship table when doing executeQuery in Grails?
body: <p>Is it possible to access the relationship table when doing HQL statement?</p>
  
  <p>As an example, I have 3 tables: account, commitment, account_commitment. It was generated using these domains:</p>
  
  <pre><code>class Account {
     static hasMany = [ commits : Commitment ]
  
     String name
  } 
  
  class Commitment {
     static hasMany = [ actors : Account ]
  
     String description
  }
  </code></pre>
  
  <p>My final and actual SQL query is something like this:</p>
  
  <pre><code>SELECT 
      b.id,
      account_name,
      d.nid,
      d.title
  FROM
      account_commitment a, // is this available in HQL?
      account b,
      commitment c,
      content_type_act d
  where
      d.nid = 3332
      and a.account_id = b.id
      and a.act_id = c.id
      and c.act_id = d.nid
  </code></pre>
  
  <p>I believe HQL only allows valid class domains. Since the relationship table is automatically generated, is this possible in HQL?</p>
  
  <p>Thanks.</p>