public static function iterate(Mongo_Document $document, $name, $model = false)
  {
    if (is_bool($model)) $model = get_called_class();
    else if (is_object($model)) $model = get_class($model);

    $value = $document->get($name);
    if (!is_array($value) && !($value instanceof Iterator)) throw new MongoException();

    $result = array();
    foreach ($value as $key => $v)
    {
      $sub = new $model($document, $name . '.' . $key);
      $result[$key] = $sub;
    }
    return $result;
  }