Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 697 Bytes

File metadata and controls

18 lines (11 loc) · 697 Bytes

Escaping Quote Strategy for Doctrine

As said in Doctrine Documentation is you want to use protected keywords for table or column name you will have to explicitly use ticks in the definition.

This will break NamingStrategy provide by doctrine and required you to know what words are protected in the database you use.

With this implementation of the QuoteStrategy interface you will not have to bother with it anymore.

Just add our EscapingQuoteStrategy to Doctrine configuration :

$configuration->setQuoteStrategy(new EscapingQuoteStrategy());