From dd012dfd90c085778b9c3c2638af96c39bc64545 Mon Sep 17 00:00:00 2001 From: jaimz22 Date: Sat, 8 Nov 2014 16:56:42 +0000 Subject: [PATCH] oops.. forgot to add a condition --- lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php | 2 +- lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php index a79f086ec..f3e4376f7 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php @@ -253,7 +253,7 @@ class ArrayHydrator extends AbstractHydrator $args = $newObject['args']; $obj = $class->newInstanceArgs($args); - if (count($args) == $scalarCount || ($scalarCount == 0 && count($rowData['newObjects']))) { + if (count($args) == $scalarCount || ($scalarCount == 0 && count($rowData['newObjects']) == 1)) { $result[$resultKey] = $obj; continue; diff --git a/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php index f7b37b38f..c8607d703 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php @@ -553,7 +553,7 @@ class ObjectHydrator extends AbstractHydrator $args = $newObject['args']; $obj = $class->newInstanceArgs($args); - if (count($args) == $scalarCount || ($scalarCount == 0 && count($rowData['newObjects']))) { + if (count($args) == $scalarCount || ($scalarCount == 0 && count($rowData['newObjects']) == 1 )) { $result[$resultKey] = $obj; continue;