title: Hibernate DetachedCriteria for this JOIN with 'OR' filters across two tables
body: <p>For SQL</p>
  
  <pre><code>SELECT PP.m, PP.f, PP.l, PP.c, RP.n as 'RPn' FROM P as PP
  INNER JOIN RPP AS RP ON PP.id = RP.id
  WHERE PP.m LIKE '%0%' OR PP.f LIKE '%0%' OR PP.l LIKE '%0%' OR RPP.n LIKE '%0%'
  </code></pre>
  
  <p>I have tried to create this <code>DetatchedCriteria</code>:</p>
  
  <pre><code>   DetachedCriteria query = DetachedCriteria.forClass(P.class, "P")
          //.setFetchMode("RP", FetchMode.JOIN)
          .createAlias("rp", "rp")
          .add(Restrictions.disjunction()
              .add(Restrictions.like("P.m", str, MatchMode.ANYWHERE))
              .add(Restrictions.like("P.f", str, MatchMode.ANYWHERE))
              .add(Restrictions.like("P.l", str, MatchMode.ANYWHERE))
              .add(Restrictions.like("rp.n", str, MatchMode.ANYWHERE))
  </code></pre>
  
  <p>I'm getting a <code>InvocationException</code> where I'm calling this in <code>getExecutableCriteria</code> to get a result <code>list</code>.</p>
  
  <p>Am I building it correctly?</p>