public function __construct(CouchDb $db, $rawData = array())
 {
     parent::__construct($rawData);
     $this->db = $db;
     // store as metadata the PHP class of this document
     $this['php_class'] = get_class($this);
 }
 public function __construct(CouchQueryable $source, $data)
 {
     $this->source = $source;
     parent::__construct($data, true);
     // create a read only document
 }