I am using the following code:
use Doctrine\ORM\Query\ResultSetMapping;
...
...
...
...
$em = $this->get( 'doctrine.orm.entity_manager' );
$rsm = new ResultSetMapping();
$query = $em->createNativeQuery( 'CALL procedureName(:param1, :param2)', $rsm )
->setParameters( array(
'param1' => 'foo',
'param2' => 'bar'
) );
$result = $query->getResult();
//$result = $query->execute(); // Also tried
$em->flush();
die(var_dump($result));
I am not getting any thing in the $result parameter. Can anyone please tell me how to get the result from a stored procedure in Symfony 2.0.15 ?
You haven't added any resultset mapping info. See here for sample.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With