/**
  * @param \MongoDbCriteria $builder
  * @return $this
  */
 public function mergeWithBuilder(MongoDbCriteria $builder)
 {
     $this->query = array_merge_recursive($this->query, $builder->getQuery());
     if (is_array($this->query['limit']) && sizeof($this->query['limit']) > 0) {
         $this->query['limit'] = $this->query['limit'][0];
     }
     if (is_array($this->query['offset']) && sizeof($this->query['offset']) > 0) {
         $this->query['offset'] = $this->query['offset'][0];
     }
     $this->checkTopLevelOperators();
     return $this;
 }