diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index f8cedd195..6f804493c 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -1341,7 +1341,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite { if (is_array($array)) { foreach ($array as $key => $value) { - if ($this->getTable()->hasRelation($key) && $deep) { + if ($deep && $this->getTable()->hasRelation($key)) { $this->$key->fromArray($value, $deep); } else if ($this->getTable()->hasField($key)) { $this->set($key, $value);