Fixed issue with foreign constraint errors and saving order.
This commit is contained in:
parent
417c361abc
commit
2c24b00385
1 changed files with 7 additions and 6 deletions
|
@ -200,13 +200,14 @@ class Doctrine_Data_Import extends Doctrine_Data
|
||||||
$this->_processRow($rowKey, $row);
|
$this->_processRow($rowKey, $row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$objects = array();
|
||||||
|
foreach ($this->_importedObjects as $object) {
|
||||||
|
$className = get_class($object);
|
||||||
|
$objects[$className] = $className;
|
||||||
|
}
|
||||||
|
|
||||||
$manager = Doctrine_Manager::getInstance();
|
$manager = Doctrine_Manager::getInstance();
|
||||||
foreach ($manager as $connection) {
|
foreach ($manager as $connection) {
|
||||||
$objects = array();
|
|
||||||
foreach ($this->_importedObjects as $object) {
|
|
||||||
$objects[] = get_class($object);
|
|
||||||
}
|
|
||||||
|
|
||||||
$tree = $connection->unitOfWork->buildFlushTree($objects);
|
$tree = $connection->unitOfWork->buildFlushTree($objects);
|
||||||
|
|
||||||
foreach ($tree as $model) {
|
foreach ($tree as $model) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue