Commit 5d3660f2 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 1b3e9817
...@@ -178,39 +178,20 @@ class Doctrine_Record_Filter ...@@ -178,39 +178,20 @@ class Doctrine_Record_Filter
*/ */
private function prepareIdentifiers($exists = true) private function prepareIdentifiers($exists = true)
{ {
switch ($this->_table->getIdentifierType()) { $id = $this->_table->getIdentifier();
case Doctrine_Identifier::AUTO_INCREMENT: $this->_id = array();
case Doctrine_Identifier::SEQUENCE: if (count($id) > 1) {
$name = $this->_table->getIdentifier(); foreach ($id as $name) {
if ($this->_data[$name] === self::$null) {
if ($exists) { $this->_id[$name] = null;
if (isset($this->_data[$name]) && $this->_data[$name] !== self::$null) { } else {
$this->_id[$name] = $this->_data[$name];
}
}
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]; $this->_id[$name] = $this->_data[$name];
} }
break; }
case Doctrine_Identifier::COMPOSITE: } else {
$names = $this->_table->getIdentifier(); if (isset($this->_data[$id]) && $this->_data[$id] !== self::$null) {
$this->_id[$id] = $this->_data[$id];
foreach ($names as $name) { }
if ($this->_data[$name] === self::$null) {
$this->_id[$name] = null;
} else {
$this->_id[$name] = $this->_data[$name];
}
}
break;
} }
} }
/** /**
......
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