1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Added imbricated query support in whereIn method (fixes #782)

This commit is contained in:
guilhermeblanco 2008-02-27 03:54:17 +00:00
parent 139febaed6
commit 331548caa9

View File

@ -1170,6 +1170,17 @@ 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 = '?';
}