title: GORM detached query by field of inherited class
body: <p>I have <code>Parent</code> classes and two <code>Child1</code> and <code>Child2</code> inherited from it:</p>
  
  <pre class="lang-java prettyprint-override"><code>class Parent { }
  class Child1 extends Parent {
      String prop1
  }
  class Child2 extends Parent {
      String prop2
  }
  </code></pre>
  
  <p>And now I need to write select all Parent clases, but with criteria on <code>prop1</code> and <code>prop2</code>, i.e. something like this</p>
  
  <pre class="lang-java prettyprint-override"><code>DetachedCriteria crit = Parent.where {
      (prop1 == 'Some value') || (prop2 == 'Some value')
  }
  crit.list()
  </code></pre>
  
  <p>How can I do that?</p>