title: How to query NOT NULL with Doctrine 2?
body: <p>I have exactly the same question as <a href="https://stackoverflow.com/questions/7305468/how-to-query-not-null-with-doctrine">asked before</a>, but the last question is 6 years old and new Doctrine versions exist, so I am now asking this in reference to the latest version of Doctrine. </p>
  
  <p>I have table Test:</p>
  
  <p>Test:</p>
  
  <pre><code>id | name 
  1  | aaa
  2  | 
  3  | ccc
  4  | aaa
  5  | 
  6  | ddd
  </code></pre>
  
  <p>I want result where name is NOT NULL:</p>
  
  <pre><code>aaa
  ccc
  aaa
  ddd
  </code></pre>
  
  <p>This syntax doesn't work:</p>
  
  <pre><code>$em-&gt;getRepository('Test')-&gt;findBy(array('name' =&gt; notnull));
  </code></pre>
  
  <p>Is there something similar that will work using the findBy syntax?</p>