13/05/2015 - DOCTRINE, SYMFONY
If you want to see what query you've written with QueryBuilder then use example below to print it.
$qb = $this->createQueryBuilder('a');
....
....
$query = $qb->getQuery();
// string
$sql = $query->getSQL();
// array
$parameters = $query->getParameters();