title: Yii2 MongoDb find comapre fields
body: <p>it might be a silly question  yet I'm stuck, i want to find records where uuid and main_uuid not equal
  im able to find records in mongo using below query in console
  Mongo Collection</p>
  <pre><code>       {
              &quot;_id&quot; : ObjectId(&quot;5ff2c31e731333aa7e3affca&quot;),
              &quot;main_uuid&quot; : &quot;c0f5ac89-8dc7-4b54-9cce-bafd523a30e5&quot;,
              &quot;uuid&quot; : &quot;c0f5ac89-8dc7-4b54-9cce-bafd523a30e5&quot;
           }
      =================================================
      mongoQuery working in console=&gt;
  db.ntc.cdr.find ( { $where : &quot;this.uuid != this.main_uuid&quot; } )
  </code></pre>
  <p>i have tried <a href="https://stackoverflow.com/questions/46049361/yii2-comparing-two-field-in-searchmodel/46050492#46050492">YIi2 - comparing two field in searchModel</a> as well but didn't worked!!</p>
  <pre><code>   class Cdr extends ActiveRecord
      {
          /**
           * {@inheritdoc}
           */
          public static function collectionName()
          {
              return [MONGO_DB, 'ntc.cdr'];
          }
          
      
      }
      
      class CdrSearch extends Cdr{
          $query = Cdr::find();
  
           $dataProvider = new ActiveDataProvider([
              'query' =&gt; $query
          ]);
      }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/0p0en.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0p0en.png" alt="enter image description here" /></a></p>