I am using DBAL Doctrine 2 (but not ORM) in Symfony2 PR9. When I do the following
$conn = $this->get('doctrine.dbal.aademo_connection'); $user = $conn->fetchAssoc('SELECT * FROM users WHERE userid = 1');
Then all the keys in the returned array have the same slightly erroneous capitalization as the database columns. Unfortunately, I cannot accidentally rename the database columns. :-)
With PDO, I can make all keys have lowercase letters with the following:
$conn->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
It seems that something should be similar in the Symfony2 file /app/config/config.yml , but I could not find such an opportunity registered on the Internet. Since Doctrine wraps PDO, is there a way to pass the ATTR_CASE parameter somehow?
James source share