Added imbricated query support in whereIn method (fixes #782)
This commit is contained in:
parent
139febaed6
commit
331548caa9
@ -1170,6 +1170,17 @@ abstract class Doctrine_Query_Abstract
|
|||||||
if ($value instanceof Doctrine_Expression) {
|
if ($value instanceof Doctrine_Expression) {
|
||||||
$value = $value->getSql();
|
$value = $value->getSql();
|
||||||
unset($params[$k]);
|
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 {
|
} else {
|
||||||
$value = '?';
|
$value = '?';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user