title: mongodb query does not work
body: <p>I have a collection, and a part of my collection is here,</p>
  
  <p>lets call this first array</p>
  
  <pre><code>$ho = array( 'a' =&gt; 
  array (
  '0' =&gt; '508bef9e6803fa6305000000',
  '1' =&gt; '50901eac6803fafb0d000000',
  '2' =&gt; '508bf3766803fa810f000000',
  '3' =&gt; '50a2aeac6803fa150b000000',
  '4' =&gt; '50a2ae846803fa140b000000',
  '5' =&gt; '50a2ae616803fab706000000',
  '6' =&gt; '50a2ae3a6803fab506000000',
  '7' =&gt; '50a2adfc6803fab306000000',
  )),
  </code></pre>
  
  <p>and there is another embed array which is from another user,lets call this second array</p>
  
  <pre><code>'_id' =&gt; new MongoId("508bef9e6803fa6305000000"),
  'a' =&gt; 
  array (
  '0' =&gt; '508bf3766803fa810f000000',
  '1' =&gt; '50a2ae616803fab706000000',
  '2' =&gt; '50a2aeac6803fa150b000000',
  ),
  </code></pre>
  
  <p>what I want to do is to substract second array from first array, but I want to do It with mongodb</p>
  
  <pre><code>'a' =&gt; 
  array (
  '0' =&gt; '508bef9e6803fa6305000000',
  '1' =&gt; '50901eac6803fafb0d000000',
  '4' =&gt; '50a2ae846803fa140b000000',
  '6' =&gt; '50a2ae3a6803fab506000000',
  '7' =&gt; '50a2adfc6803fab306000000',
  ),
  </code></pre>
  
  <p>I tried different queries but could not get the result like this one,thank you for any help :)</p>
  
  <pre><code>$lk = $m-&gt;kud-&gt;user-&gt;findOne(
  array(
  "_id" =&gt; new MongoId("508bef9e6803fa6305000000"),'$nin'=&gt;array("a"=&gt;$ho["a"])
  ), 
  array("_id" =&gt; 0, "a" =&gt; 1)
  );
  </code></pre>