Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
Added check if _id is set to couchdb adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkin committed Apr 3, 2011
1 parent 06ec0c5 commit e3f54d2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions JForg/Dodb/Adapter/Couchdb.php
Expand Up @@ -314,8 +314,12 @@ public function arrayToDocument(array $data)
$doc = Solar::factory('JForg_Dodb_Document');
}

$tmp['id'] = $data['_id'];
unset($data['_id']);
if ( isset($data['_id']) )
{
$tmp['id'] = $data['_id'];
unset($data['_id']);
}

foreach ( $data as $key => $value )
{
if ( in_array($key, $this->_special_propertys, true) )
Expand Down

0 comments on commit e3f54d2

Please sign in to comment.