title: Passing a null value from java for a primary field column of Table is giving wrong answer
body: <p>I have written a <code>@NamedNativeQuery</code> in Java as:</p>
  
  <pre><code>SELECT COUNT(e.emp_id) FROM EMP e WHERE e.code = ? AND 
  (e.emp_id IS NULL OR e.emp_id != ?) AND e.proj_id = ?") 
  </code></pre>
  
  <p>NOTE: <code>emp_id</code> is a primary key in <code>EMP</code> table.</p>
  
  <p>When I execute this query it returns <code>0</code> whenever I pass <code>null</code> for primary key data, even though the answer should be something else.</p>
  
  <p>What is wrong in this , <code>e.emp_id</code> can have java <code>null</code> value, is this causing problem or something else.</p>