title: get data using not ids not working in cakephp
body: <p>I want to select data for all rows where the below ids dont exist. I thought this would work but there is no error and the below ids still appear in the retrieved records.  I am using cakephp 2.5 for this</p>
  
  <pre><code>  $ids///
  
  array(
  (int) 0 =&gt; '14721',
  (int) 1 =&gt; '14731',
  (int) 2 =&gt; '14905',
  (int) 3 =&gt; '15808',
  (int) 4 =&gt; '15818',
  
  
  
   $test=$this-&gt;Lessonbak-&gt;find('all', array(
        'fields'=&gt;array('id'),
       'recursive' =&gt; -1 ) );
  
   $ids=array();
   foreach(  $test as  $item):
       array_push($ids,$item['Lessonbak']['id']);
  
   endforeach;  
  
    $lessonstudent2=$this-&gt;LessonsStudent2-&gt;find('all', array(
           'conditions' =&gt; array(  "NOT" =&gt; array( 'LessonsStudent2.lesson_id' =&gt; $ids )),
           'recursive' =&gt; -1 ) ); 
  </code></pre>