public function push($name, $value, $emulate = null)
  {
    $name = $this->get_field_name($name);
    if(isset($this->_operations['$pushAll'][$name]))
    {
      $this->_operations['$pushAll'][$name][] = $value;
    }
    else if(isset($this->_operations['$push'][$name]))
    {
      $this->_operations['$pushAll'][$name] = array($this->_operations['$push'][$name],$value);
      unset($this->_operations['$push'][$name]);
      if( ! count($this->_operations['$push']))
        unset($this->_operations['$push']);
    }
    else
    {
      $this->_operations['$push'][$name] = $value;
    }
    if ($emulate === FALSE || ($emulate === null && $this->_emulate === FALSE))
    {
      return $this->_set_dirty($name);
    }
    else
    {
      $ref = & $this->get_field_reference($name, TRUE, array());
      if (!is_array($ref)) throw new MongoException("Value '$name' cannot be used as an array");
      array_push($ref, $value);
      return $this;
    }
  }