diff --git a/lib/Doctrine/Query/Abstract.php b/lib/Doctrine/Query/Abstract.php index f5288a3d6..e6edde935 100644 --- a/lib/Doctrine/Query/Abstract.php +++ b/lib/Doctrine/Query/Abstract.php @@ -1170,8 +1170,19 @@ abstract class Doctrine_Query_Abstract if ($value instanceof Doctrine_Expression) { $value = $value->getSql(); unset($params[$k]); + } else if (is_object($value) && $value instanceof Doctrine_Query) { // Imbricated Query? + $field = $value->getDqlPart('select'); + $field = $field[0]; + + $rstemp = $value->execute(); + + $value = array(); + + foreach ($rstemp as $key => $object) { // Create a table with values in imbricated query + array_push($value, $object->$field); + } } else { - $value = '?'; + $value = '?'; } $a[] = $value; }