This commit is contained in:
parent
37e6248b8a
commit
4ab524089a
@ -1457,6 +1457,15 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
|
|||||||
|
|
||||||
$q->execute();
|
$q->execute();
|
||||||
|
|
||||||
|
|
||||||
|
} elseif ($rel instanceof Doctrine_Relation_ForeignKey) {
|
||||||
|
$q->update($rel->getTable()->getComponentName())
|
||||||
|
->set($rel->getForeign(), '?', array(null))
|
||||||
|
->addWhere($rel->getForeign() . ' = ?', array_values($this->identifier()))
|
||||||
|
->whereIn($rel->getTable()->getIdentifier(), $ids);
|
||||||
|
|
||||||
|
$q->execute();
|
||||||
|
}
|
||||||
if (isset($this->_references[$alias])) {
|
if (isset($this->_references[$alias])) {
|
||||||
foreach ($this->_references[$alias] as $k => $record) {
|
foreach ($this->_references[$alias] as $k => $record) {
|
||||||
if (in_array(current($record->identifier()), $ids)) {
|
if (in_array(current($record->identifier()), $ids)) {
|
||||||
@ -1465,7 +1474,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
|
|||||||
}
|
}
|
||||||
$this->_references[$alias]->takeSnapshot();
|
$this->_references[$alias]->takeSnapshot();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user