Commit 7a020a52 authored by doctrine's avatar doctrine

support for normal identifiers

parent ffe169cd
......@@ -292,7 +292,6 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
switch($this->table->getIdentifierType()):
case Doctrine_Identifier::AUTO_INCREMENT:
case Doctrine_Identifier::SEQUENCE:
$name = $this->table->getIdentifier();
if($exists) {
......@@ -303,9 +302,16 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
unset($this->data[$name]);
break;
case Doctrine_Identifier::NORMAL:
$this->id = array();
$name = $this->table->getIdentifier();
if(isset($this->data[$name]) && $this->data[$name] !== self::$null)
$this->id[$name] = $this->data[$name];
break;
case Doctrine_Identifier::COMPOSITE:
$names = $this->table->getIdentifier();
$this->id = array();
foreach($names as $name) {
if($this->data[$name] === self::$null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment