title: Left join fetch with condition fails
body: <p>I have the following <code>HQL</code> query:</p>
  
  <pre><code>return entityManager().createQuery(
      "SELECT page FROM ProjectPage page"
    + " left join fetch page.categorySet as category              "
    + " where page.id = :id " 
    + " and  category.parentCategory is null "
    + " and  (category.status != :status_val) " 
    ,ProjectPage.class).setParameter("id", id)
    .setParameter("status_val", 1).getSingleResult();
  </code></pre>
  
  <p>the problem is that the conditions in the where clause fails, for example, the query returns category objects whose status is 1 and category objects whose parentCategory is not null although i specified this constrains as stated above!!</p>