#1262 DDC-3513 - RunDqlCommand
should write to the output object rather than to the output buffer
This commit is contained in:
parent
f06d652393
commit
fea0425a4f
@ -81,6 +81,7 @@ EOT
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
/* @var $em \Doctrine\ORM\EntityManagerInterface */
|
||||
$em = $this->getHelper('em')->getEntityManager();
|
||||
|
||||
if (($dql = $input->getArgument('dql')) === null) {
|
||||
@ -120,13 +121,13 @@ EOT
|
||||
$query->setMaxResults((int) $maxResult);
|
||||
}
|
||||
|
||||
if ($input->hasOption('show-sql') && $input->getOption('show-sql')) {
|
||||
Debug::dump($query->getSQL());
|
||||
if ($input->getOption('show-sql')) {
|
||||
$output->writeln(Debug::dump($query->getSQL(), 2, true, false));
|
||||
return;
|
||||
}
|
||||
|
||||
$resultSet = $query->execute(array(), constant($hydrationMode));
|
||||
|
||||
Debug::dump($resultSet, $input->getOption('depth'));
|
||||
$output->writeln(Debug::dump($resultSet, $input->getOption('depth'), true, false));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user