Auto quote reserved words with Doctrine 2

doctrine-orm

Solution

This was an issue I raised a while back with the Doctrine team.

https://github.com/doctrine/doctrine2/issues/2409

The ticket was closed with the comment:

You have to manually escape characters with @Column(name="`integer`")

So I guess you'd need to deal with any reserved keywords in your annotations

Problem

Is there a way to auto quote reserved words with Doctrine 2 when using `$entityManager->find('entity', id)` ? When using the query builder this can be done but there should be a global configuration setting that does this? I don't want to have to specify it in the annotations for the reserved words.

Original source