1
0
mirror of synced 2025-01-29 19:41:45 +03:00

support for normal identifiers

This commit is contained in:
doctrine 2006-07-27 18:31:18 +00:00
parent ffe169cd03
commit 7a020a524b

View File

@ -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)