title: JPA/JPQL returns incomplete results with WHERE x.y IS NULL OR x.y.z = 1
body: <p>I have the following SQL returning 13 results</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT *
  FROM AAA a
  JOIN BBB b ON b.id = a.b_id
  LEFT JOIN CCC c ON c.id = b.c_id
  LEFT JOIN DDD d ON d.id = c.d_id
  WHERE b.c_id IS NULL
  OR d.status = 1
  </code></pre>
  
  <p>And following JPQL returning 3 results</p>
  
  <pre><code>SELECT a
  FROM AAA a
  WHERE a.b.c IS NULL
  </code></pre>
  
  <p>And following JPQL returning 10 results</p>
  
  <pre><code>SELECT a
  FROM AAA a
  WHERE a.b.c.d.status = 1
  </code></pre>
  
  <p>But the following JPQL returns 10 results, missing the 3 null ones.</p>
  
  <pre><code>SELECT a
  FROM AAA a
  WHERE a.b.c IS NULL
  OR a.b.c.d.status = 1
  </code></pre>
  
  <p>What am I missing? Where do I begin debugging this?</p>