Commit 4ab52408 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 37e6248b
...@@ -1457,14 +1457,22 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count ...@@ -1457,14 +1457,22 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
$q->execute(); $q->execute();
if (isset($this->_references[$alias])) {
foreach ($this->_references[$alias] as $k => $record) { } elseif ($rel instanceof Doctrine_Relation_ForeignKey) {
if (in_array(current($record->identifier()), $ids)) { $q->update($rel->getTable()->getComponentName())
$this->_references[$alias]->remove($k); ->set($rel->getForeign(), '?', array(null))
} ->addWhere($rel->getForeign() . ' = ?', array_values($this->identifier()))
->whereIn($rel->getTable()->getIdentifier(), $ids);
$q->execute();
}
if (isset($this->_references[$alias])) {
foreach ($this->_references[$alias] as $k => $record) {
if (in_array(current($record->identifier()), $ids)) {
$this->_references[$alias]->remove($k);
} }
$this->_references[$alias]->takeSnapshot();
} }
$this->_references[$alias]->takeSnapshot();
} }
return $this; return $this;
} }
......
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