Reputation: 3224
I would like to get the 'real' SQL Query doctrine is passing to the SQL Server:
<?php
$em = $this->getDoctrine()->getEntityManager();
$myQuery = $em->createQuery('SELECT v FROM ....... v');
echo $myQuery->???????
?>
What I must to write instead of ???????? characters ?
I have tried with getSQLQuery() and with getSQL() but no luck for now.
Thanks..
Upvotes: 1
Views: 5673
Reputation: 81
You were almost there, it's getSql, not getSQL:
$myQuery->getSql()
Upvotes: 8