If quote_identifier is set to true, some Doctrine queries break. For example:
$query = new Doctrine_Query();
$query->select('q.id, q.body, COUNT(ea.id) experts, COUNT(sa.id) students')
->from('Question q')
->leftJoin('q.Answers ea WITH ea.expert = 1')
->leftJoin('q.Answers sa WITH sa.expert = 0')
->groupby('q.id');
The table aliases used in the ON clauses do not match the table aliases declared in the LEFT JOIN clauses, e.g. this SQL (after adding where and limit clauses):
SELECT DISTINCT `q2`.`id` FROM `question` `q2` LEFT JOIN `answer` `a3` ON `q2`.`id` = `a3`.`question_id` AND a.expert = 1 LEFT JOIN `answer` `a4` ON `q2`.`id` = `a4`.`question_id` AND a2.expert = 0 WHERE `q2`.`role_id` = ? GROUP BY `q2`.`id` LIMIT 5