title: query.setMaxResults() causes problems on toplink
body: <p>I am using JPA (toplink) and trying to restrict the number of rows returned by a JPQL query, so I've used <code>Query.setMaxResults</code> method, but It throws the following error:</p>
  
  <pre><code>Exception [TOPLINK-6121] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.QueryException
  Exception Description: The query has not been defined correctly, the expression builder is missing.  For sub and parallel queries ensure the queries builder is always on the left.
  </code></pre>
  
  <p>Here's the query:</p>
  
  <pre><code>select distinct d.deptName from Departement d join d.employees e where e.empId in (select distinct a.employee.empId from ApprovedEmpls a join a.NewEmps o)
  </code></pre>