Commit 331548ca authored by guilhermeblanco's avatar guilhermeblanco

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

parent 139febae
......@@ -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 = '?';
}
......
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