Commit a795996e authored by subzero2000's avatar subzero2000

Addresses issue of infinte function recursion when saving related objects. Fixes #363.

parent a593d746
...@@ -221,11 +221,15 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module ...@@ -221,11 +221,15 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module
} else { } else {
// ONE-TO-ONE relationship // ONE-TO-ONE relationship
$obj = $record->get($rel->getAlias()); $obj = $record->get($rel->getAlias());
// Protection against infinite function recursion before attempting to save
if ($obj->isModified()) {
$obj->save($this->conn); $obj->save($this->conn);
} }
} }
} }
}
return $saveLater; return $saveLater;
} }
/** /**
......
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